Saturday, January 28, 2017

Control Page Numbers using Quick Parts->Field Codes in MS Word

The following are the steps that you will have to follow to do what you are after:
  1. Press Alt+F9 to reveal the field codes.
  2. Select the whole of the {NUMPAGES} field including the { and }
  3. Press Ctrl+F9 - this will place a pair of braces { } around the NUMPAGES field so that it now looks like:
    { {NUMPAGES} }
    
  4. Between the { {, insert an = sign, and between the } } insert -1 so that the field now looks like:
    {={NUMPAGES}-1}
    
  5. Now press Alt+F9 to hide the field codes and select the field, which will still probably shown the total number of pages and press F9 to update the fields. You should now have the result that you are after.
Note: The main thing to remember when working with fields is that you must use Ctrl+F9 to insert a pair of { }. Typing them in from the keyboard does not work.
Previewing the document will also update the fields as will printing it if the Update Fields box is checked under the Tools>Options>Print menu item (newer versions will put it in File>Options>Display).
enter image description here

Ref. link: http://superuser.com/questions/817691/word-syntax-error-with-numpages-and-formula