WD: NUMPAGES Field Does Not Work During Mail Merge

Last reviewed: February 10, 1998
Article ID: Q91031

The information in this article applies to:
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, version 7.0, 7.0a
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 97 for Windows

SYMPTOMS

When you perform a mail merge operation using a main document that contains a NUMPAGES field, the number "1" appears in the merged documents, regardless of how many pages there are in the main document.

This occurs regardless of whether you insert the NUMPAGES field in the header, footer, or the body of your main document.

WORKAROUND

To work around this behavior, use one of the following methods:

  • Before you perform the mail merge operation, change the NUMPAGES field to text in your main document by selecting the field, pressing F9 to update the field, and then pressing CTRL+SHIFT+F9 to change the result of the field to text. Use this workaround if all your merged documents contain the same number of pages. This workaround is inappropriate if the number of pages in your merged document varies from record to record.

        -or-
    
  • In place of the NUMPAGES field, use a PAGEREF field that references a bookmark inserted at the end of your main document. To do this, position the insertion point at the end of your document and click Bookmark on the Insert menu. Type "MergedNumber" (without the quotation marks) in the Bookmark Name box and click the Add or OK button. In place of the NUMPAGES field, insert the following field:

          {PAGEREF MergedNumber}
    

    NOTE: This workaround provides incorrect PAGEREF field results if you use the Merge To New Document option when you perform the print merge operation. It only works if you use the Merge To Printer option.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Word 98 Macintosh Edition.

MORE INFORMATION

By design, Word does not insert the NUMPAGES field in merged documents because the field result would reflect the total pages in the merged document instead of the total pages for each record. Therefore, the NUMPAGES field is often inappropriate for print merge main documents.

NOTE: The NUMPAGES field obtains its result from the Document Statistics dialog box. You cannot modify Document Statistics information; therefore, you cannot affect the result of the NUMPAGES field.

REFERENCES

"Microsoft Word for Windows User's Guide," version 2.0, pages 637-639


Additional query words: winword2 wrong unlink
Keywords : kbfield kbmerge macword ntword winword word6 word7 word95 word97 kbualink97
Version : WINDOWS:2.0,2.0a,2.0a- CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a,97;MACINTOSH:6.0,6.0.1,6.0.1a
Platform : MACINTOSH WINDOWS
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 10, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.