Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Footers after the fact
In there any way to add footers en mass?
I have a rather large and complicated workbook and I would like to add footers to everything that prints from the workbook. Is there any code that will add a footer (picture) to anything that prints from a workbook? Adding footers to all charts and graphs will take me a couple hours. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Footers after the fact
Here you go just add this to a standard module:
Sub AddFooters() Dim ws As Worksheet For Each ws In Worksheets With ws.PageSetup .LeftFooter = "My Left Footer" .CenterFooter = "My Center Footer" .RightFooter = "My Right Footer" End With Next End Sub Open VBE (Alt +F11) Insert---Module Paste Code Run MAcro "AddFooters" Sandy SmartyPants wrote: In there any way to add footers en mass? I have a rather large and complicated workbook and I would like to add footers to everything that prints from the workbook. Is there any code that will add a footer (picture) to anything that prints from a workbook? Adding footers to all charts and graphs will take me a couple hours. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Footers after the fact
maybe you can play around with the below to suit your needs:
Sub xxx() Dim mySheet As Worksheet For Each mySheet In ActiveWorkbook.Worksheets With mySheet.PageSetup .LeftFooterPicture.Filename = "C:\Sunset.jpg" .LeftFooter = "&G" End With Next mySheet Dim myChart As Chart For Each myChart In ActiveWorkbook.Charts With myChart.PageSetup .LeftFooterPicture.Filename = "C:\Sunset.jpg" .LeftFooter = "&G" End With Next myChart End Sub Rgds J On Nov 22, 1:39 pm, "SmartyPants" wrote: In there any way to add footers en mass? I have a rather large and complicated workbook and I would like to add footers to everything that prints from the workbook. Is there any code that will add a footer (picture) to anything that prints from a workbook? Adding footers to all charts and graphs will take me a couple hours. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Footers after the fact
You can use the beforeprint event to have your code add the footers. To get the code, turn on the macro recorder while you do it manually. Then open the beforeclose event and put similar code there. http://www.cpearson.com/excel/events.htm for an overview of event code if you are not familiar with it. -- Regards, Tom Ogilvy "SmartyPants" wrote: In there any way to add footers en mass? I have a rather large and complicated workbook and I would like to add footers to everything that prints from the workbook. Is there any code that will add a footer (picture) to anything that prints from a workbook? Adding footers to all charts and graphs will take me a couple hours. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fact() | Excel Worksheet Functions | |||
Determing the SQL Datasource After the Fact | Excel Discussion (Misc queries) | |||
Round(cell,0) after the Fact | Excel Programming | |||
Factorial (like =FACT) function? | Excel Worksheet Functions | |||
Shortcut Ket after the fact | Excel Programming |