W
Ward Visser
Hi all,
I want to add 1TextBox and 2 Pictures to the wdHeaderFooterFirstPage and
no TextBox and 2 other Pictures to the other Headers of all pages exept the
first (wdHeaderFooterPrimary)
The Picture-part works fine but not the TextBox.
Next code generates a TextBox in the Headers of all pages exept the required
and expected first FirstPage:
*****
Dim myDoc As Word.Document
Dim myShape As Word.Shape
Set myDoc = ActiveDocument
myDoc.PageSetup.DifferentFirstPageHeaderFooter = True
Set myShape =
myDoc.Sections(1).Headers(wdHeaderFooterFirstPage).Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
Left:=CentimetersToPoints(1), _
Top:=CentimetersToPoints(2.5), _
Width:=CentimetersToPoints(4), _
Height:=CentimetersToPoints(6))
With myShape
.Name = "AdresPA"
.TextFrame.TextRange = "Test"
End With
*****
What am i doing wrong?
Thank you,
Ward.
I want to add 1TextBox and 2 Pictures to the wdHeaderFooterFirstPage and
no TextBox and 2 other Pictures to the other Headers of all pages exept the
first (wdHeaderFooterPrimary)
The Picture-part works fine but not the TextBox.
Next code generates a TextBox in the Headers of all pages exept the required
and expected first FirstPage:
*****
Dim myDoc As Word.Document
Dim myShape As Word.Shape
Set myDoc = ActiveDocument
myDoc.PageSetup.DifferentFirstPageHeaderFooter = True
Set myShape =
myDoc.Sections(1).Headers(wdHeaderFooterFirstPage).Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
Left:=CentimetersToPoints(1), _
Top:=CentimetersToPoints(2.5), _
Width:=CentimetersToPoints(4), _
Height:=CentimetersToPoints(6))
With myShape
.Name = "AdresPA"
.TextFrame.TextRange = "Test"
End With
*****
What am i doing wrong?
Thank you,
Ward.