Numpages Minus 1 Syntax Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business word numpages wrong Learn more about hiring developers or posting ads with us Super User Questions Tags Users word field code page number + 1 Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only numpages word 2013 takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Word Syntax Error with NumPages and Formula up vote 3 syntax error in word formula down vote favorite 2 I'm trying to use the following as a field in word: { = { NumPages } - 1 } And I get the following error: !Syntax Error, { I seem to be using the right format per Microsoft. Any ideas? Thanks as always. microsoft-word microsoft-word-2013 field-codes share|improve this question asked Sep 27 '14 at 21:22 Mark Williams 2121614 add a comment| 1 Answer 1 active oldest votes up vote 6 down vote
Word 2010 Numpages Minus 1
accepted The following are the steps that you will have to follow to do what you are after: Press Alt+F9 to reveal the field codes. Select the whole of the {NUMPAGES} field including the { and } Press Ctrl+F9 - this will place a pair of braces { } around the NUMPAGES field so that it now looks like: { {NUMPAGES} } Between the { {, insert an = sign, and between the } } insert -1 so that the field now looks like: {={NUMPAGES}-1} 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. 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). 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. share|improve this answer edited Sep 28 '14 at 6:29 answered Sep 28 '14 at 6:21 krowe 4,1961925 I'm still getting the syntax error message. See my code in the original answer - it is identical to your code.
Tech Support Guy, we highly recommend that you visit our Guide for New Members. Solved: Word 2007 Page Numbering: Make {NUMPAGES} start counting from Page 2? Discussion in 'Business Applications' started by Nebulousity, Mar 31,
Numpages Section
2011. Thread Status: Not open for further replies. Advertisement Nebulousity Thread Starter Joined: Jul 18, syntax error microsoft word 2008 Messages: 56 This question is about using "Page {PAGE} of {NUMPAGES}." I've read many solutions for this online and in MS's help numpages field files. None of them are working, and it really has me perplexed because I consider myself an advanced user. My document is a book: The first page of my book is a cover page. It shouldn't be http://superuser.com/questions/817691/word-syntax-error-with-numpages-and-formula counted in page numbering. Beginning on the second page, my book has a TOC and then 9 chapters. The TOC and each chapter are set up in their own sections. (I do this because I include the chapter's name - which is the section name - in the footer along with page numbers. It also facilitates creating the TOC) I want the TOC to be counted as Page 1 All of that works fine for the https://forums.techguy.org/threads/solved-word-2007-page-numbering-make-numpages-start-counting-from-page-2.989006/ {PAGE} page number. To accomplish it, I told Word to start counting page numbers from 0, and I suppressed displaying the number on the Cover. Then for subsequent pages I selected "Continue from previous section." My issue is that I really want to show both the current page and the total number of pages ("Page {PAGE} of {NUMPAGES}") in the footer. When I try that, {PAGE} displays correctly, but {NUMPAGES} shows one too many. It is obviously counting the cover page. Evidently what I did in #5 above only affects the count for {PAGE} and not for {NUMPAGES}. All over the web I find the simple solution of using a formula field for {NUMPAGES} as follows: =1+{NUMPAGES} Actually, I think that would do the opposite of what I want. I would probably have to subtract a page rater than add one, but the formula doesn't work anyway. I've found all sorts of variants of that and have tried numerous ones. I have also tried many things on my own. Each time I try something, Word either displays a Syntax Error or else nothing at all where the Number of Pages should appear. I've shared a document on SendSpace that shows screenshots along the way. The document itself is a Word 2007 document. Here's a link: http://bit.ly/gwbCh2 I should add that I wondered if there was some
6, 2006. Guest Guest I am just trying to enter a simple formula in my footer because I have multiple sections in the document and want to exclude the title page in the count. I http://www.pcreview.co.uk/threads/why-do-i-get-syntax-error-when-i-try-to-enter-numpages-1.2785006/ must be missing something really basic about writing formulas in Word. I can get a http://www.office-forums.com/threads/re-numpages-1-syntax-error.465275/ simple numerical calculation to work, i.e =(5-2), but when I try to subtract from the NUMPAGES, then I get syntax error. I've been entering in the "insert" formula" and also toggling field within the document. No luck though. Guest, Dec 6, 2006 #1 Advertisements Suzanne S. Barnhill Guest Try adding some spaces: { = { NUMPAGES } - syntax error 1 } -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "SSDLUE" <> wrote in message news:... > I am just trying to enter a simple formula in my footer because I have > multiple sections in the document and want to exclude the title page in the > count. I numpages minus 1 must be missing something really basic about writing formulas in > Word. I can get a simple numerical calculation to work, i.e =(5-2), but when > I try to subtract from the NUMPAGES, then I get syntax error. I've been > entering in the "insert" formula" and also toggling field within the > document. No luck though. Suzanne S. Barnhill, Dec 6, 2006 #2 Advertisements Greg Maxey Guest I would say that you are typing litterally the "{NumPages}" part. You need to use CTRL+F9 to enter the both field brace pairs { { } } and then type in the text { = { NumPages } - 1 } Suzanne S. Barnhill wrote: > Try adding some spaces: > > { = { NUMPAGES } - 1 } > > -- > Suzanne S. Barnhill > Microsoft MVP (Word) > Words into Type > Fairhope, Alabama USA > Word MVP FAQ site: http://word.mvps.org > Email cannot be acknowledged; please post all follow-ups to the newsgroup so > all may benefit. > > "SSDLUE" <> wrote in message > news:... > > I am just trying to enter a simple formula in my footer because I have > > multiple sections in the document and want to exclude the title page in > the > > count. I must be missin
Guest The presence or absence of spaces shouldn't make any difference, but try { = { NUMPAGES } -1 } And of course I'm sure you realize that each pair of braces must be inserted using Ctrl+F9 (or you can insert the { NUMPAGES } field using the Insert Number of Pages button on the Header and Footer toolbar). -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://www.mvps.org/word Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Scott Reed" <> wrote in message news:075e01c36850$42902080$... > The field, {={NUMPAGES}}, earns a syntax error. I want to > use the field, {={NUMPAGES}-1}, but can't even get to > first base. > > The example from the help pages is {=(startpage-1)+ > {NUMPAGES}}. That, of course, also gets a syntax error. > > I don't want to use the literal number of pages because > the document might change it's length. Can anyone help me? Suzanne S. Barnhill, Aug 22, 2003 #1 Advertisements Show Ignored Content Want to reply to this thread or ask your own question? It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum. Sign Up Now! Similar Threads Closing Document creates Compile Error Syntax Error coachvince, Sep 3, 2003, in forum: Word Errors Replies: 0 Views: 118 coachvince Sep 3, 2003 update fields - NumPages Mark Grubin, Jul 22, 2004, in forum: Word Errors Replies: 2 Views: 181 Suzanne S. Barnhill Sep 1, 2004 command line option syntax error hotsprings_kim, Feb 11, 2005, in forum: Word Errors Replies: 1 Views: 196 garfield-n-odie Feb 11, 2005 Fire the persom who wrote your grammer and syntax program for Word , Apr 27, 2005, in forum: Word Errors Replies: 5 Views: 109 Beth Melton Apr 28, 2005 Compile error Syntax error , Feb 17, 2006, in forum: Word Errors Replies: 1 Views: 243 Beth Melton F