Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add TextBox in FirstPage Header

Status
Not open for further replies.

Zig999

Programmer
Nov 8, 2005
20
BR
Hi there.

The documents I'm working with have to had the FirstPageHeaderFooter = true.
I want to add a textbox to this firstpage header and I just can´t get it done.
Here is the code I´m trying to use. It adds the normal text to the right header, but the Textbox is added in the second page, and not the first one.

Code:
Sub ShapeAdd()

Dim ShapeTest As Shape
Dim Section As Section
Dim Header As HeaderFooter

With ActiveDocument
    .PageSetup.DifferentFirstPageHeaderFooter = True
    .Sections(1).Headers(wdHeaderFooterFirstPage).Range.InsertBefore "My Text"
    .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes.AddTextbox msoTextOrientationHorizontal, 480, 100, 70, 14
End With

End Sub

Any idea why? help? Sugestions?

Thanks everybody

Zig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top