Prev: Correcting the Total Number of Pages when have TOC which you don't wantincluded
Next: rtf braces {} - \keepctrl - please
From: Suzanne S. Barnhill on 20 May 2010 16:22 Are you using Ctrl+F9 to insert the braces? The easiest way to do this is to type = before the { NUMPAGES } field and -3 after it, then select the entire expression and press Ctrl+F9. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org <Virginia Wilber> wrote in message news:2010520155119virginia.c.wilber(a)lmco.com... >I read your reply and I am unable to get it to work even though I didn't >have a problem getting this to work in Word 2003. > > I select Page Number from the Header/Footer portion of the toolbar and > get: > > Page 1 of 159 > > Then I use Alt F9 to see what it actually says and get: > > Page { PAGE } of { NUMPAGES } > > as you said (I'm using Word 2007). Then I change it to read: > > Page { PAGE } of { = { NUMPAGES } - 3 } as specified -- inserting the "= > {" and "} - 3" within the NUMPAGES original braces. > > However, the results are not correct. Below is what I get when I use Alt > F9 to return to "regular" view. > > Page 1 of > > So next I change it to read: > > Page { PAGE } of { = { NUMPAGES } - 3 } as specified -- inserting the "{ = > " and " - 3 }" outside the original NUMPAGES braces. > > Again the results are not correct. Below is what I get when I use Alt F9 > to return to "regular" view. > > Page 1 of { = 159 - 3 } > > I certainly hope you can help. > > > > > > > > Suzanne S. Barnhill wrote: > > If you know the number of pages in the front matter (and it will > notchange), > 15-Apr-10 > > If you know the number of pages in the front matter (and it will not > change), then you can use Page { Page } of { = { NumPages } - x }, where x > is the number of pages in the front matter. > > If not, then you insert a bookmark on the last page of the document and > use > a PageRef field to reference the page number of that bookmark instead of > the > NumPages field. > > -- > Suzanne S. Barnhill > Microsoft MVP (Word) > Words into Type > Fairhope, Alabama USA > http://word.mvps.org > > Previous Posts In This Thread: > > On Thursday, April 15, 2010 10:07 AM > Rhonda wrote: > > Total Page Number Minus Number of Pages in Front Matter > I have a document with 4 pages of front matter (cover page and table of > contents) and then 42 pages of text in the body of the document. I have > the > pages of the body numbered "Page X of Y", but the Y is the total pages of > the > entire document (46) and I want it to represent Y minus the pages in the > front matter (42) i.e. I want all my body pages to actually say "Page 'X > 'of > 42" not "Page 'X' of 46". Of course I could manually enter the number 42 > in > place of Y, but the document will eventually be updated and additional > pages > will result so I want it automated. (If the solution involves fields and > formulas, go slow I have no idea how to create new ones!) > > Thanks so much! > Rhonda > > On Thursday, April 15, 2010 11:02 AM > Suzanne S. Barnhill wrote: > > If you know the number of pages in the front matter (and it will > notchange), > If you know the number of pages in the front matter (and it will not > change), then you can use Page { Page } of { = { NumPages } - x }, where x > is the number of pages in the front matter. > > If not, then you insert a bookmark on the last page of the document and > use > a PageRef field to reference the page number of that bookmark instead of > the > NumPages field. > > -- > Suzanne S. Barnhill > Microsoft MVP (Word) > Words into Type > Fairhope, Alabama USA > http://word.mvps.org > > On Thursday, April 15, 2010 11:20 AM > Jay Freedman wrote: > > There are two possible situations:- If the document contains only two > sections > There are two possible situations: > > - If the document contains only two sections (separated by one section > break), then you can simply change the field that supplies the total. If > you > right-click the total number and choose Toggle Field Codes, you will see > the > field code {NUMPAGES}. Change that to {SECTIONPAGES} and press F9 (or > right-click and choose Update Field) to show the result. This will now be > the total number of pages in the section that contains the body. > > - If the body of the document consists of two or more sections (not > counting > the frontmatter section), then the SECTIONPAGES field will not work -- it > would > show the total of pages in the current section, which would change part > way > through the body. Instead, first insert a bookmark in the last paragraph > of > the document -- I suggest naming it LastPage. Now right-click the total > number in the page numbering and choose Toggle Field Codes. Replace the > word > NUMPAGES with this: > > PAGEREF LastPage > > (If you named the bookmark something else, use that in the field code.) > Press F9 to update the field, which will show the page number of the last > page in the body. > > There is a minor difficulty with this: it is easy to overwrite and delete > the > bookmark, in which case the field will display "Error! Bookmark not > defined." Then you have to go back to the end of the document and insert > the > bookmark again. it is also easy to add more pages after the bookmark, in > which case the page numbering will be wrong, and you will have to move the > bookmark (which you do by going to the end of the document and inserting > the > same bookmark, which automatically deletes the old one). It helps to go > into > the Options dialog and check the box to display bookmarks at all times. > > -- > Regards, > Jay Freedman > Microsoft Word MVP FAQ: http://word.mvps.org > Email cannot be acknowledged; please post all follow-ups to the newsgroup > so > all may benefit. > > Rhonda wrote: > > > Submitted via EggHeadCafe - Software Developer Portal of Choice > LINQ With Strings > http://www.eggheadcafe.com/tutorials/aspnet/03afdcf3-7b60-47db-adb9-db7fe2c6ab8c/linq-with-strings.aspx |