|
|
Hi
Im trying to put userinitials and filename on the last page of a document only. Pagenumbers are set to start with 0, and pagenumbers are not shown on forst page. I have put a bookmark on the last page and uses this:
{ IF { PAGE \* MEGEFORMAT} ={PAGEREF MYBOOK \* MERGEFORMAT} {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} }
but it appears blank on all pages.
Jan
|
|
Did you put the bookmark on the last page and not in the header/footer? Did you update the fields? - Updating fields in the header is a pain - use the sample macro at http://www.gmayor.com/installing_macro.htm You need quotes around the result fields or you will get the slash on all pages and the initials on the last page. The Mergeformat switches even if spelled correctly are superfluous.
{ IF { PAGE } = { PAGEREF MYBOOK } "{ USERINITIALS } / { FILENAME }" }
The following should work also.
{ IF { PAGE } = { NUMPAGES } "{ USERINITIALS } / { FILENAME }" }
-- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Jan Kronsell wrote:
[Quoted Text] > Hi > > Im trying to put userinitials and filename on the last page of a > document only. Pagenumbers are set to start with 0, and pagenumbers > are not shown on forst page. I have put a bookmark on the last page > and uses this: > { IF { PAGE \* MEGEFORMAT} ={PAGEREF MYBOOK \* MERGEFORMAT} > {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } > > but it appears blank on all pages. > > Jan
|
|
As Graham points out, there's no need for a bookmark. The final page is (nearly) always equal to the NUMPAGES so simply use the PAGES=NUMPAGES to construct the IF argument.
-- Terry Farrell - MSWord MVP
"Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text] > Hi > > Im trying to put userinitials and filename on the last page of a document > only. Pagenumbers are set to start with 0, and pagenumbers are not shown > on forst page. I have put a bookmark on the last page and uses this: > > { IF { PAGE \* MEGEFORMAT} ={PAGEREF MYBOOK \* MERGEFORMAT} {USERINITIALS > \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } > > but it appears blank on all pages. > > Jan > > > > >
|
|
In this case lastpage is not equal to numpages, which causes the problem in the first place. But I'll try Grahams solution a little later on.
Jan
Terry Farrell wrote:
[Quoted Text] > As Graham points out, there's no need for a bookmark. The final page > is (nearly) always equal to the NUMPAGES so simply use the > PAGES=NUMPAGES to construct the IF argument. > > > "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message > news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl... >> Hi >> >> Im trying to put userinitials and filename on the last page of a >> document only. Pagenumbers are set to start with 0, and pagenumbers >> are not shown on forst page. I have put a bookmark on the last page >> and uses this: { IF { PAGE \* MEGEFORMAT} ={PAGEREF MYBOOK \* >> MERGEFORMAT} >> {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } >> >> but it appears blank on all pages. >> >> Jan
|
|
If the page really is the *last* page, then it will be the same as NUMPAGES regardless of what page numbers appear on the pages.
-- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA
"Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message news:Oo6Kz7lTJHA.5376[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text] > In this case lastpage is not equal to numpages, which causes the problem > in the first place. > But I'll try Grahams solution a little later on. > > Jan > > Terry Farrell wrote: >> As Graham points out, there's no need for a bookmark. The final page >> is (nearly) always equal to the NUMPAGES so simply use the >> PAGES=NUMPAGES to construct the IF argument. >> >> >> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >> news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl... >>> Hi >>> >>> Im trying to put userinitials and filename on the last page of a >>> document only. Pagenumbers are set to start with 0, and pagenumbers >>> are not shown on forst page. I have put a bookmark on the last page >>> and uses this: { IF { PAGE \* MEGEFORMAT} ={PAGEREF MYBOOK \* >>> MERGEFORMAT} >>> {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } >>> >>> but it appears blank on all pages. >>> >>> Jan > > >
|
|
This is my original fields
{IF {PAGE} = {NUMPAGES} "{USERINITIALS} / [FILENAME}"}
and it works perfectly allright until I format pagenumbering to start with 0 in stead of 1. Then all pages in the document appears blank. And if I show values in stead of fieldcodes on the last page it says
{IF 4 = 5 "{USERINITIALS} / [FILENAME}"}
Jan
Suzanne S. Barnhill wrote:
[Quoted Text] > If the page really is the *last* page, then it will be the same as > NUMPAGES regardless of what page numbers appear on the pages. > > > "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message > news:Oo6Kz7lTJHA.5376[ at ]TK2MSFTNGP02.phx.gbl... >> In this case lastpage is not equal to numpages, which causes the >> problem in the first place. >> But I'll try Grahams solution a little later on. >> >> Jan >> >> Terry Farrell wrote: >>> As Graham points out, there's no need for a bookmark. The final page >>> is (nearly) always equal to the NUMPAGES so simply use the >>> PAGES=NUMPAGES to construct the IF argument. >>> >>> >>> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >>> news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl... >>>> Hi >>>> >>>> Im trying to put userinitials and filename on the last page of a >>>> document only. Pagenumbers are set to start with 0, and pagenumbers >>>> are not shown on forst page. I have put a bookmark on the last page >>>> and uses this: { IF { PAGE \* MEGEFORMAT} ={PAGEREF MYBOOK \* >>>> MERGEFORMAT} >>>> {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } >>>> >>>> but it appears blank on all pages. >>>> >>>> Jan
|
|
But now I got it to work using
IF {PAGE} = {PAGEREF MYBOOK} "{USERINITIALS} / [FILENAME}"}
and placing a bookmark on the bottom of the last page.
So thank yopu for your effort everybody.
Jan
Jan Kronsell wrote:
[Quoted Text] > This is my original fields > > {IF {PAGE} = {NUMPAGES} "{USERINITIALS} / [FILENAME}"} > > and it works perfectly allright until I format pagenumbering to start > with 0 in stead of 1. Then all pages in the document appears blank. > And if I show values in stead of fieldcodes on the last page it says > > {IF 4 = 5 "{USERINITIALS} / [FILENAME}"} > > Jan > > > > Suzanne S. Barnhill wrote: >> If the page really is the *last* page, then it will be the same as >> NUMPAGES regardless of what page numbers appear on the pages. >> >> >> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >> news:Oo6Kz7lTJHA.5376[ at ]TK2MSFTNGP02.phx.gbl... >>> In this case lastpage is not equal to numpages, which causes the >>> problem in the first place. >>> But I'll try Grahams solution a little later on. >>> >>> Jan >>> >>> Terry Farrell wrote: >>>> As Graham points out, there's no need for a bookmark. The final >>>> page is (nearly) always equal to the NUMPAGES so simply use the >>>> PAGES=NUMPAGES to construct the IF argument. >>>> >>>> >>>> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >>>> news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl... >>>>> Hi >>>>> >>>>> Im trying to put userinitials and filename on the last page of a >>>>> document only. Pagenumbers are set to start with 0, and >>>>> pagenumbers are not shown on forst page. I have put a bookmark on >>>>> the last page and uses this: { IF { PAGE \* MEGEFORMAT} ={PAGEREF >>>>> MYBOOK \* MERGEFORMAT} >>>>> {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } >>>>> >>>>> but it appears blank on all pages. >>>>> >>>>> Jan
|
|
If you started numbering from zero, all you need to do is edit the field to PAGE = NUMPAGES-1 and it will work.
Terry
"Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message news:%23uXLBvnTJHA.4680[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text] > But now I got it to work using > > IF {PAGE} = {PAGEREF MYBOOK} "{USERINITIALS} / [FILENAME}"} > > and placing a bookmark on the bottom of the last page. > > So thank yopu for your effort everybody. > > Jan > > Jan Kronsell wrote: >> This is my original fields >> >> {IF {PAGE} = {NUMPAGES} "{USERINITIALS} / [FILENAME}"} >> >> and it works perfectly allright until I format pagenumbering to start >> with 0 in stead of 1. Then all pages in the document appears blank. >> And if I show values in stead of fieldcodes on the last page it says >> >> {IF 4 = 5 "{USERINITIALS} / [FILENAME}"} >> >> Jan >> >> >> >> Suzanne S. Barnhill wrote: >>> If the page really is the *last* page, then it will be the same as >>> NUMPAGES regardless of what page numbers appear on the pages. >>> >>> >>> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >>> news:Oo6Kz7lTJHA.5376[ at ]TK2MSFTNGP02.phx.gbl... >>>> In this case lastpage is not equal to numpages, which causes the >>>> problem in the first place. >>>> But I'll try Grahams solution a little later on. >>>> >>>> Jan >>>> >>>> Terry Farrell wrote: >>>>> As Graham points out, there's no need for a bookmark. The final >>>>> page is (nearly) always equal to the NUMPAGES so simply use the >>>>> PAGES=NUMPAGES to construct the IF argument. >>>>> >>>>> >>>>> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >>>>> news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl... >>>>>> Hi >>>>>> >>>>>> Im trying to put userinitials and filename on the last page of a >>>>>> document only. Pagenumbers are set to start with 0, and >>>>>> pagenumbers are not shown on forst page. I have put a bookmark on >>>>>> the last page and uses this: { IF { PAGE \* MEGEFORMAT} ={PAGEREF >>>>>> MYBOOK \* MERGEFORMAT} >>>>>> {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } >>>>>> >>>>>> but it appears blank on all pages. >>>>>> >>>>>> Jan > >
|
|
I know, but sometimes pangenumbering starts on page 3, sometimes on page 85, sometimes.... And I don't know before I start thwe document, which it is. The reason is, that everything before the body is on unnumberede pages, and I never can say before the user starts to write, how much that will be.
Jan
Terry Farrell wrote:
[Quoted Text] > If you started numbering from zero, all you need to do is edit the > field to PAGE = NUMPAGES-1 and it will work. > > Terry > > "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message > news:%23uXLBvnTJHA.4680[ at ]TK2MSFTNGP06.phx.gbl... >> But now I got it to work using >> >> IF {PAGE} = {PAGEREF MYBOOK} "{USERINITIALS} / [FILENAME}"} >> >> and placing a bookmark on the bottom of the last page. >> >> So thank yopu for your effort everybody. >> >> Jan >> >> Jan Kronsell wrote: >>> This is my original fields >>> >>> {IF {PAGE} = {NUMPAGES} "{USERINITIALS} / [FILENAME}"} >>> >>> and it works perfectly allright until I format pagenumbering to >>> start with 0 in stead of 1. Then all pages in the document appears >>> blank. And if I show values in stead of fieldcodes on the last page >>> it says {IF 4 = 5 "{USERINITIALS} / [FILENAME}"} >>> >>> Jan >>> >>> >>> >>> Suzanne S. Barnhill wrote: >>>> If the page really is the *last* page, then it will be the same as >>>> NUMPAGES regardless of what page numbers appear on the pages. >>>> >>>> >>>> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in message >>>> news:Oo6Kz7lTJHA.5376[ at ]TK2MSFTNGP02.phx.gbl... >>>>> In this case lastpage is not equal to numpages, which causes the >>>>> problem in the first place. >>>>> But I'll try Grahams solution a little later on. >>>>> >>>>> Jan >>>>> >>>>> Terry Farrell wrote: >>>>>> As Graham points out, there's no need for a bookmark. The final >>>>>> page is (nearly) always equal to the NUMPAGES so simply use the >>>>>> PAGES=NUMPAGES to construct the IF argument. >>>>>> >>>>>> >>>>>> "Jan Kronsell" <kronsell(nomorespam)[ at ]adslhome.dk> wrote in >>>>>> message news:OwiTl$VTJHA.1148[ at ]TK2MSFTNGP05.phx.gbl... >>>>>>> Hi >>>>>>> >>>>>>> Im trying to put userinitials and filename on the last page of a >>>>>>> document only. Pagenumbers are set to start with 0, and >>>>>>> pagenumbers are not shown on forst page. I have put a bookmark >>>>>>> on the last page and uses this: { IF { PAGE \* MEGEFORMAT} >>>>>>> ={PAGEREF MYBOOK \* MERGEFORMAT} >>>>>>> {USERINITIALS \* MERGEFORMAT} / {FILENAME \*MERGEFORMAT} } >>>>>>> >>>>>>> but it appears blank on all pages. >>>>>>> >>>>>>> Jan
|
|
|