|
| View previous topic :: View next topic |
| Author |
Message |
Jane Smythee Guest
|
Posted: Tue Nov 20, 2007 2:30 pm Post subject: How alter Word 2003 doc last page footer without altering ot |
|
|
How can the last page footer of a Word 2003 document be altered without
altering the information in the footers of the other pages?
A word template document is used with a visual basic program to generate
over 26,000 individual word documents using details from a file. The
individual word documents can have between 2-30 pages. The footer of this
word template document contains a two cell table. Cell 1 of this table must
contain a different value for the first, middle, and last pages of the word
document. For example, the first page cell 1 must be 20. Last page cell 1
must be 10. The middle pages must be 00. The cell 1 values increment for each
document and are not the same for each document.
If a section break is manually or programmatically added before the footer
of the last page, the first page either appears blank or it becomes section 1
with the rest of the pages becoming section 2 even though the goal was for
the last page to become section 2. Inserting a page at the end of the
document and then attempting the section break has the same results.
How can a section break be forced before the last footer without impacting
the other pages?
--
J Smythee |
|
| Back to top |
|
 |
Google Sponsor

|
Posted: Tue Nov 20, 2007 2:30 pm Post subject: Advertisement |
|
|
|
|
| Back to top |
|
 |
Jean-Guy Marcil Guest
|
Posted: Tue Nov 20, 2007 5:57 pm Post subject: Re: How alter Word 2003 doc last page footer without alterin |
|
|
Jane Smythee was telling us:
Jane Smythee nous racontait que :
| Quote: | How can the last page footer of a Word 2003 document be altered
without altering the information in the footers of the other pages?
A word template document is used with a visual basic program to
generate over 26,000 individual word documents using details from a
file. The individual word documents can have between 2-30 pages. The
footer of this word template document contains a two cell table. Cell
1 of this table must contain a different value for the first, middle,
and last pages of the word document. For example, the first page cell
1 must be 20. Last page cell 1 must be 10. The middle pages must be
00. The cell 1 values increment for each document and are not the
same for each document.
If a section break is manually or programmatically added before the
footer of the last page, the first page either appears blank or it
becomes section 1 with the rest of the pages becoming section 2 even
though the goal was for the last page to become section 2. Inserting
a page at the end of the document and then attempting the section
break has the same results.
How can a section break be forced before the last footer without
impacting the other pages?
|
You can use conditional fields in the footer table cell, for example:
{IF {PAGE} = 1 "This is the first page" "{IF {PAGE}={NUMPAGES}"This is the
last page" "This is a middle page"}"}
Each {} pair must be created with CTRL-F9 and the placement of the " must be
precise.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org |
|
| Back to top |
|
 |
Jane Smythee Guest
|
Posted: Tue Nov 20, 2007 9:10 pm Post subject: Re: How alter Word 2003 doc last page footer without alterin |
|
|
Thank you for your reply...
Can a variable be passed to this method?
For example, can the following:
{IF {PAGE} = 1 "This is the first page" "{IF {PAGE}={NUMPAGES}"This is the
last page" "This is a middle page"}"}
receive a variable like [vBOC] and [vEOC]:
{IF {PAGE} = 1 "[vBOC]" "{IF {PAGE}={NUMPAGES}"[vEOC]" "*00*"}"}
--
J Smythee
"Jean-Guy Marcil" wrote:
| Quote: | Jane Smythee was telling us:
Jane Smythee nous racontait que :
How can the last page footer of a Word 2003 document be altered
without altering the information in the footers of the other pages?
A word template document is used with a visual basic program to
generate over 26,000 individual word documents using details from a
file. The individual word documents can have between 2-30 pages. The
footer of this word template document contains a two cell table. Cell
1 of this table must contain a different value for the first, middle,
and last pages of the word document. For example, the first page cell
1 must be 20. Last page cell 1 must be 10. The middle pages must be
00. The cell 1 values increment for each document and are not the
same for each document.
If a section break is manually or programmatically added before the
footer of the last page, the first page either appears blank or it
becomes section 1 with the rest of the pages becoming section 2 even
though the goal was for the last page to become section 2. Inserting
a page at the end of the document and then attempting the section
break has the same results.
How can a section break be forced before the last footer without
impacting the other pages?
You can use conditional fields in the footer table cell, for example:
{IF {PAGE} = 1 "This is the first page" "{IF {PAGE}={NUMPAGES}"This is the
last page" "This is a middle page"}"}
Each {} pair must be created with CTRL-F9 and the placement of the " must be
precise.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
|
|
|
| Back to top |
|
 |
Jean-Guy Marcil Guest
|
Posted: Tue Nov 20, 2007 10:34 pm Post subject: Re: How alter Word 2003 doc last page footer without alterin |
|
|
Jane Smythee was telling us:
Jane Smythee nous racontait que :
| Quote: | Thank you for your reply...
Can a variable be passed to this method?
For example, can the following:
{IF {PAGE} = 1 "This is the first page" "{IF {PAGE}={NUMPAGES}"This
is the last page" "This is a middle page"}"}
receive a variable like [vBOC] and [vEOC]:
{IF {PAGE} = 1 "[vBOC]" "{IF {PAGE}={NUMPAGES}"[vEOC]" "*00*"}"}
|
You could use document variables and the associated {DOCVARIABLE}field.
{IF {PAGE} = 1 "{DOCVARIABLE vBOC}" "{IF {PAGE}={NUMPAGES}"{DOCVARIABLE
vEOC}" "*00*"}"}
Alternatively, custom document properties can be used as well. The latter do
not require VBA, document variables require VBA to manipulate them.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org |
|
| Back to top |
|
 |
Jonathan West Guest
|
Posted: Wed Nov 21, 2007 11:34 am Post subject: Re: How alter Word 2003 doc last page footer without alterin |
|
|
"Jane Smythee" <JaneSmythee@discussions.microsoft.com> wrote in message
news:F7C3C87D-E42B-4114-BE45-FF0D68AB9BE7@microsoft.com...
| Quote: | Thank you for your reply...
Can a variable be passed to this method?
For example, can the following:
{IF {PAGE} = 1 "This is the first page" "{IF {PAGE}={NUMPAGES}"This is the
last page" "This is a middle page"}"}
receive a variable like [vBOC] and [vEOC]:
{IF {PAGE} = 1 "[vBOC]" "{IF {PAGE}={NUMPAGES}"[vEOC]" "*00*"}"}
|
Not a VBA variable. But you can create a custom document property, put
whatever text you want into the property, and insert a DOCPROPERTY field
referring to it between the quotes.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|