Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2010, 10:34 AM
roytom roytom is offline print pages with footer of last page different Windows 7 print pages with footer of last page different Office 2003
Novice
print pages with footer of last page different
 
Join Date: Jul 2010
Posts: 4
roytom is on a distinguished road
Default print pages with footer of last page different

Hi All,

I need to print all pages in a sheet with "continued on next page" at the foot of each page where there is a follow on page.

Obviously the last page footer needs to be different saying something like "end of document" or "last page".

But there is no way of doing this easily in Excel 2003.

I have come across some code that I think allows just a footer on the last page to be printed (see below).

Is there a way to adapt this to get all pages footers (except last) to be something like "continued...." and the last page footer "End of doc...."?

Thanks.
Roy


Sub test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.RightFooter = ""


ActiveSheet.PrintOut From:=1, To:=TotPages - 1
.RightFooter = "Your footer info"
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
End With
End Sub
Reply With Quote
  #2  
Old 12-13-2010, 02:09 PM
BjornS BjornS is offline print pages with footer of last page different Windows Vista print pages with footer of last page different Office 2003
Competent Performer
 
Join Date: Jan 2010
Location: Sweden
Posts: 116
BjornS is on a distinguished road
Default

Hi,
my suggestion for solution is to instead use the built-in functions that are available when creating header/footer.

There you find symbols which represent current page and also total pages. With the help of those, you can easily create a footer that looks like this on page 1: Page 1 (of 7) and that will look like this on the last page: Page 7 (of 7)

That also gives you the advantage of page numbers on each page.

Kind regards
Bjorn
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page does not show header & footer Ron O'Brien Word 5 01-04-2012 07:34 AM
Print 2 pages to a sheet in Landscape page orientation Alexie Excel 1 09-18-2010 01:29 AM
pages show in preview but not in print layout skipper64 Word 0 05-18-2010 04:46 PM
print pages with footer of last page different Footer "page X of Y (y=total pages in doc)" Dan360 Word 1 12-18-2008 01:30 PM
print pages with footer of last page different Help with Header & Footer on first page only in Template bvlgari Word 1 12-01-2008 03:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft