Printing Scripts

E

effendrew-google

is there a script or an easy way to print the 'Worksheet Name' in the
header or footer without going thru each worksheet? I am using Office
2004 on a Mac.

Thanks
 
B

Bob Greenblatt

is there a script or an easy way to print the 'Worksheet Name' in the
header or footer without going thru each worksheet? I am using Office
2004 on a Mac.

Thanks
You can insert the sheet name into a header or footer easily. Just go to
Page setup, then header/footer. Click the one you want and then click on the
icon that looks like a rolodex card (third from the right).
 
B

Bob Greenblatt

is there a script or an easy way to print the 'Worksheet Name' in the
header or footer without going thru each worksheet? I am using Office
2004 on a Mac.

Thanks
Please post to only one group. Your question will get answered.
 
E

effendrew-google

Yes i understand how to do that, I am looking for a script to do that
automatically to a file that has 22 worksheets. I really did not want
to go to each worksheet individually.
 
J

JE McGimpsey

Yes i understand how to do that, I am looking for a script to do that
automatically to a file that has 22 worksheets. I really did not want
to go to each worksheet individually.

If you select the left-most worksheet, then Shift-Click on the
right-most worksheet, you'll group the sheets ("[Group]" will appear in
the title bar). You can then make changes to all the sheets at once,
including the footers.

Just make sure that you then right- (or CTRL-) click the worksheet tabs
and choose Ungroup before making any changes that you only want to
affect one sheet.

Or you could use something like this macro:

Public Sub ChangeAllFooters()
Const sFOOTER As String = "&F"
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.PageSetup.LeftFooter = sFOOTER
Next ws
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top