Why I cannot print "Page 2"?

E

Eric

I use the following code and want to print "Page 2" in the header from page 2.
Why it prints "2 Page"

With ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary
.Range.Font.Size = 11.
.Range.Paragraphs.Alignment = wdAlignParagraphLef
.Range.InsertBefore "Page
.PageNumbers.Add.Alignment = wdAlignPageNumberLef
End With
 
D

Doug Robbins - Word MVP

The following will reverse the order, giving you Page 2

Set myField =
ActiveDocument.Fields.Add(Range:=ActiveDocument.Sections(1).Headers(wdHeader
FooterPrimary).Range, _
Type:=wdFieldPage)
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.InsertBefore
"Page "


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top