View Single Post
 
Old 12-13-2010, 10:34 AM
roytom roytom is offline Windows 7 Office 2003
Novice
 
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