ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Header & Footer make template for multiple users (https://www.excelbanter.com/excel-discussion-misc-queries/102213-header-footer-make-template-multiple-users.html)

HeintjeHB

Header & Footer make template for multiple users
 
I´m looking for a possibility to program a template for excel 2003 where the
file creator and the creation date automatically appear in the header and or
footer.

Is there any code to program this and how do i make it as a template on all
computers through the entire company?

Dave Peterson

Header & Footer make template for multiple users
 
I think you'll need more than a template file. There are somethings that aren't
available just through templates.

But you could create a template file with a macro that adds the stuff you want
to the header/footer.

The macro in the template workbook could look something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet

With ThisWorkbook
If .Path = "" Then
For Each wks In .Worksheets
With wks.PageSetup
.LeftFooter = Application.UserName
.RightFooter = Format(Date, "mm/dd/yyyy")
End With
Next wks
End If
End With

End Sub


I'd put the template file in a common network folder that is accessible to
everyone.

Then I'd use MSWord to tell Office where to find these templates.
Inside MSWord
tools|Options|File Locations|Workgroup templates
(I'd try to use the UNC path \\server\sharename\folder\folder instead of the
mapped drive, too.)

Excel will use that location--although excel doesn't have a nice way to set that
folder location.


HeintjeHB wrote:

I´m looking for a possibility to program a template for excel 2003 where the
file creator and the creation date automatically appear in the header and or
footer.

Is there any code to program this and how do i make it as a template on all
computers through the entire company?


--

Dave Peterson


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com