Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Excel Headers and Footers

Status
Not open for further replies.

EliseFreedman

Programmer
Dec 6, 2002
470
GB
I have a spreadsheet which I am trying to set up to print via a macro for a colleague. At first glance this seemed like an easy task. However it is complicated by the fact that she is printing the worksheet to a photocopier which automatically staples each booklet after printing.

The first page contains the cover sheet for the booklet which is then followed by all the remaining pages. I would like to set it up so that the first page does not have any page numbering in the footer but that the remaining pages do. I managed to do this using code as shown below. However, the photocopier then only staples from the 2nd sheet onwards. The only way I have found to get the whole thing stapled is to print it in one single print run. However, I am then stuck with footers on the front page. Does anyone have any ideas.

Code:
'Application.EnableEvents = False
'With ActiveSheet
'.PageSetup.LeftFooter = ""
'.PageSetup.RightFooter = ""
' ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
'.PageSetup.LeftFooter = Format(Now(), "d mmmm yyyy") 'inserts date
'.PageSetup.RightFooter = "&P" ' inserts page number
' ActiveWindow.SelectedSheets.PrintOut From:=2, Copies:=1, Collate:=True
'End With
'Cancel = True
'Application.EnableEvents = True
 
Elsie

Let's assume that Sheet1 is the COVER SHEET and Sheet2 is for the remainder of the booklet.

Select Sheet Tabs for Sheets 1 & 2

Print.

Note: If Sheet2 has [Page] in the header/footer, the FIRST pasge will be 2. If you want the first page number to be 1 then
[tt]
[Page]-1
[/tt]
:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top