View Full Version : Newbie Here...
cablesurfr
07-21-2006, 05:42 AM
Hello I am not really sure how this forum works, I can't follow the linking between the KB posts to the forum, at any rate there is an excellent snippet for Footers, (JOrzech (http://www.vbaexpress.com/forum/member.php?u=111) 's http://www.vbaexpress.com/kb/getarticle.php?kb_id=24 ) post, I wanted to just reply there but alas... I would like code exactly as it is with one exception in that this footer be placed only on the last page.
Thanks in advance!
Dana
fumei
07-21-2006, 06:49 AM
If you want a footer only on the last page, then the last page MUST be in its own Section. MUST.
cablesurfr
07-21-2006, 06:58 AM
Thanks for the quick reply Gerry (Fumei). Providing I do use sections, how would I change the code I have referenced in this thread? Do I refererence the section?
Thanks
Dana
fumei
07-21-2006, 07:07 PM
The code you have is not IMHO the best way of doing it, although of course it works. I never use Selection with footers. I always reference them directly. So I never go through that ActiveWindow View stuff.
To use the code you have, add at the start:Selection.EndKey Unit:=wdStoryThat will move the Selection to the end of the document (the last page). Now the code - which uses Selection - will action on the header/footer of the last page.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.