Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fact() Jitka Excel Worksheet Functions 10 December 2nd 08 12:33 AM
Determing the SQL Datasource After the Fact Gilley Excel Discussion (Misc queries) 2 June 13th 07 07:32 PM
Round(cell,0) after the Fact Jim May Excel Programming 4 August 16th 06 07:41 PM
Factorial (like =FACT) function? mr tom Excel Worksheet Functions 8 June 13th 06 01:45 AM
Shortcut Ket after the fact Sandra[_3_] Excel Programming 1 April 21st 04 08:23 PM


All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"