Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 20 Nov 2007 06:26:03 -0800,    group: microsoft.public.word.formatting.longdocs        back       


How alter Word 2003 doc last page footer without altering other pa   
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
date: Tue, 20 Nov 2007 06:26:03 -0800   author:   Jane Smythee

Re: How alter Word 2003 doc last page footer without altering other pa   
You don't need a section break. You can (as I assume you know) use
"Different first page" to get a different footer for the first page in a
section. To get a different value in the last page, you need an IF field:

{ IF { PAGE } = { NUMPAGES } "Text you want on the last page" "Text you want
on the other pages" }

-- 
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.

"Jane Smythee"  wrote in message
news:126C99BC-1FE9-480E-9A58-3920B2B069B8@microsoft.com...
> 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
date: Tue, 20 Nov 2007 09:32:54 -0600   author:   Suzanne S. Barnhill

Re: How alter Word 2003 doc last page footer without altering othe   
Thank you very much for your reply.

Using this method, is there a way to find/replace the last page footer value 
with an incremented value or to pass an incremented value to this method? For 
example, Doc 1 needs a last page footer value of 10. Doc 2 needs a last page 
footer value of 11. Doc 32 wraps back to a last page footer value of 10. The 
code is in place to provide this incremented value but a method is needed to 
get it into the last page footer without changing the other doc footers.

-- 
J Smythee


"Suzanne S. Barnhill" wrote:

> You don't need a section break. You can (as I assume you know) use
> "Different first page" to get a different footer for the first page in a
> section. To get a different value in the last page, you need an IF field:
> 
> { IF { PAGE } = { NUMPAGES } "Text you want on the last page" "Text you want
> on the other pages" }
> 
> -- 
> 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.
> 
> "Jane Smythee"  wrote in message
> news:126C99BC-1FE9-480E-9A58-3920B2B069B8@microsoft.com...
> > 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
> 
>
date: Tue, 20 Nov 2007 08:33:01 -0800   author:   Jane Smythee

Re: How alter Word 2003 doc last page footer without altering othe   
There's probably a way, though I can't tell you exactly what it would be;
you might try asking in one of the word.vba NGs for help. Some possibilities
to consider:

* Find and Replace at its most basic: if field codes are displayed, you can
find and replace text in them just as you would anywhere else, but you'd
have to tell Word where to look.

* You might want to consider using a DocProperty field to insert the number.
Of course, you'd have to find a way to write the value to the document
property, but that can be done, see
http://word.mvps.org/faqs/macrosvba/DSOFile.htm

I think the latter might be a more productive avenue of investigation for
doing this through automation.

-- 
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.

"Jane Smythee"  wrote in message
news:0DB8A27E-E4DE-413D-B391-5EAD44FE58D5@microsoft.com...
> Thank you very much for your reply.
>
> Using this method, is there a way to find/replace the last page footer
value
> with an incremented value or to pass an incremented value to this method?
For
> example, Doc 1 needs a last page footer value of 10. Doc 2 needs a last
page
> footer value of 11. Doc 32 wraps back to a last page footer value of 10.
The
> code is in place to provide this incremented value but a method is needed
to
> get it into the last page footer without changing the other doc footers.
>
> -- 
> J Smythee
>
>
> "Suzanne S. Barnhill" wrote:
>
> > You don't need a section break. You can (as I assume you know) use
> > "Different first page" to get a different footer for the first page in a
> > section. To get a different value in the last page, you need an IF
field:
> >
> > { IF { PAGE } = { NUMPAGES } "Text you want on the last page" "Text you
want
> > on the other pages" }
> >
> > -- 
> > 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.
> >
> > "Jane Smythee"  wrote in message
> > news:126C99BC-1FE9-480E-9A58-3920B2B069B8@microsoft.com...
> > > 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
> >
> >
date: Tue, 20 Nov 2007 11:46:42 -0600   author:   Suzanne S. Barnhill

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us