0

I have a calculation in the footer of my Word document that only displays on the last page. I compare the current page with numpages. If they are the same, it displays the footer details.

All good, but I have a situation when someone adds a cover page, which means that there is now one page more than the calculation, and the back page doesn't show anything. If they remove the cover page, it's fine again.

If I add a bookmark, with a unique name, along with the cover, I thought I could use this to reduce the numpages value by one. Does anyone have any suggestions on the syntax? Can you even calculate a bookmark's existence?

Dirk Vollmar
  • 172,527
  • 53
  • 255
  • 316
Boyplunder
  • 75
  • 1
  • 10

1 Answers1

0

Searching Bookmarks.Exists Method in VBA Help may help.

Ben Welman
  • 301
  • 2
  • 4
  • Hi Ben, I need to do it in a formula in the footer, not from a vb macro. I can't see how I can do that with the Bookmarks.Exists method. I'll give it a go. – Boyplunder Mar 11 '13 at 15:43
  • The fields Page and Numpages are not allways updated when adding another page. They are updated when doing a print preview. Try this, maybe your calculation works. – Ben Welman Mar 12 '13 at 12:08
  • Thankfully the client decided that actually they want the covers in as standard, so this issue is no longer an issue. I'm still intrigued though. 'Page' shows the page number, 'Numpages' shows the full count of the pages in the document, so if you add an optional cover, which is page zero, because you don't want the page numbers to change, Numpages will always be one more than the page number, and you will never see the calculated footer, because Page will always be one short. – Boyplunder Mar 14 '13 at 00:24