"Insert->Page Numbers" vs "Header and Footer->Insert Page Number"

  • Thread starter Wes from Scottsdale
  • Start date
W

Wes from Scottsdale

I working on VBA to insert a document number into the footer. Some of my
users add page numbers from the Insert menu, others add them from the H&F
toolbar. Unfortunately, Word seems to treat them very differently.

When the Insert menu is used, Word seems to add a text box containing the
page number. In the footer.range.text, this text box seems to exist in front
of the rest of the contents of the footer, even if visually the text box is
after or below the other contents.

How do I access that text box through VBA?

Thanks.
 
D

Doug Robbins - Word MVP

It's actually a Frame into which the {Page} field is inserted when page
numbers are added via the Insert menu.

You can access the .Range of each Frame in the Footer and check if it
contains a field of .Type wdFieldPage

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

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