locked
Adding Shapes To Headers RRS feed

  • Question

  • Why Picture is added to even page while Line and TextEffect is always added to odd pages in the next code? I run this macro in Word 2003 on document with different headers for first, even and odd pages. In the Word 2007 Picture is added to the first page while Line and TextEffect still to odd. Any ideas?
    Code Snippet

    Sub HeaderShapes()
    With ActiveDocument
    .Sections(1).Headers(wdHeaderFooterEvenPages).Shapes.AddPicture "c:\WINDOWS\Coffee Bean.bmp"
    .Sections(1).Headers(wdHeaderFooterEvenPages).Shapes.AddTextEffect msoTextEffect1, "12345", "Times New Roman", 12, msoFalse, msoFalse, 0, 0
    .Sections(1).Headers(wdHeaderFooterEvenPages).Shapes.AddLine 0, 0, 100, 100
    End With
    End Sub


    Thanks for help in advance.
    Wednesday, July 23, 2008 9:08 AM