View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
dbgeorge dbgeorge is offline
external usenet poster
 
Posts: 4
Default Word 2007: { Page } number not updating if within { IF... } statem

I have a VB programs that opens a Word document, mail merges to a new
document which is then printed. The problem is the { PAGE } number in the
footer is not updating when the mail merge creates the new document if the {
PAGE } field is within an { IF... } statement. This worked with Word 2000,
but not with Word 2007. If I make the document visible as it is being
updated, the document before the mail merge shows the page numbers correctly
for each page, but the new document that is created will show page 1 for each
page.

Example that does not work:
{ IF { MERGEFIELD Property_State } = "VA" "Page { PAGE } of { NUMPAGES }" "" }

Example that does work if not within an { IF... } statement:
Page { PAGE } of { NUMPAGES }