1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Syntax error in Word 2007 {={NUMPAGES}-2} ??

Discussion in 'Business Applications' started by 1techgirl, Jan 4, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. 1techgirl

    1techgirl Thread Starter

    Joined:
    Dec 10, 2004
    Messages:
    167
    Hi Peeps

    Thanks for taking a look at my query. I am trying to put in a formula using field codes to give the page number to a document which has a front cover and a contents page. This is what I want the page numbering to look like on the document:

    Page x of y

    However, as I don't want to count the front cover and contents page, I am trying to mod the field code {NUMPAGES} so that takes 2 from the total number of pages so on the lsat page of the document I get Page 10 of 10, rather than Page 10 of 12, because {NUMPAGES} is the total number of pages. I understand the concept of using field codes (or thought I did !!), so I am using CTRL + F9 to build up a code, but I keep getting the error !Invalid Character Setting. I am competely baffled and frustrated! I have tried all variations of spacing between each character and between each field code etc but no difference : (

    Can anyone hlep me please? Google suggests that I am doing everything right, but Word 2007 just won't have it :(

    Looking forward to your input!
     
  2. Abe999

    Abe999

    Joined:
    Nov 5, 2012
    Messages:
    115
    I found this explanation: http://support.microsoft.com/kb/81059 for "!Invalid Character Setting" Hope it helps. BTW, your syntax works fine for me (Word 2007) and a word of thanks because I've always wondered how to set up unusual page numbering schemes.
     
  3. 1techgirl

    1techgirl Thread Starter

    Joined:
    Dec 10, 2004
    Messages:
    167
    Hi Abe999

    Thanks for your post - the document I am working on is Word 2007 too, but the original contents I had copied from a very old document that was probably re Word 2003 or even older, so maybe some setting has affected the whole thing when I copied it over to my new Word 2007. I'll start from scratch tomorrow on a new Word 2007 and see what happens. Cheers : )
     
  4. md2lgyk

    md2lgyk

    Joined:
    Jul 3, 2003
    Messages:
    1,068
    There are easier ways to do what you want.
     
  5. 1techgirl

    1techgirl Thread Starter

    Joined:
    Dec 10, 2004
    Messages:
    167
    Hi md2lgyk

    Could you let me know what they are please? Cheers : )
     
  6. md2lgyk

    md2lgyk

    Joined:
    Jul 3, 2003
    Messages:
    1,068
    Delete all page numbering. Insert a next page section break at the bottom of the last page you don't want counted. Then, on the page where you want counting to begin, open the footer and deselect Same as Previous (or maybe Link to Previous). Then format the page numbering however you want.

    I used to do this a lot when writing military technical manuals where various pages of the front matter had to be numbered differently (some with capital letters, some with lower case letters, some with roman numerals).
     
  7. 1techgirl

    1techgirl Thread Starter

    Joined:
    Dec 10, 2004
    Messages:
    167
    Hi md2lgk

    I have tried this before, but the problem is if I use the "Page x of y" the y gives the total number of pages in the whole document, regardless of how many sections there are in the document. I have a report which has a cover page and a contents page and two pages of the actual report itself. I don't want the cover page and contents page counted as part of the document, so the "Page x of y" should read Page 1 of 2 on the first page, and then Page 2 of 2 on the second page, but they read "Page 1 of 4" and "Page 2 of 4".

    Frustrating!
     
  8. md2lgyk

    md2lgyk

    Joined:
    Jul 3, 2003
    Messages:
    1,068
    Indeed. I'm sure there some simple setting to make this work like you want. I have never used the page x of y format so am not sure how to set it up. Perhaps one of the Word gurus here can help. As I am now retired, I don't have access to Word to play with it.
     
  9. Abe999

    Abe999

    Joined:
    Nov 5, 2012
    Messages:
    115
    I think you just need to make one change in order to get the results you want. In the "y" portion of your page numbering format change the field NumPages to SectionPages. Let me know if that doesn't work, and I'll send you the steps I took to recreate your page scheme.
     
  10. 1techgirl

    1techgirl Thread Starter

    Joined:
    Dec 10, 2004
    Messages:
    167
    Abe999 - just tried this and it works perfectly! Many, many thanks! : )
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1083704

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice