footer

  • Thread starter Thread starter Ramin
  • Start date Start date
R

Ramin

Hi,


Is it possible that if user creates new documents in word or excel,
automatically (date, name, paths and etc) to be added as footer

or is it possible somehow to make domainwide via AD?

Regards,
Ramin

Thanks,
Ramin
 
In Excel, add the following code to Personal.xls

Private WithEvents app As Application

Private Sub app_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean)
With Wb.ActiveSheet.PageSetup
.LeftFooter = ActiveWorkbook.FullName
.RightFooter = Format(Date, "dd mmm yyyy")
End With
End Sub

Private Sub Workbook_Open()
Set app = Application
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
The following is a basic approach to achieve what you want in Word:
Create a template which includes the following fields in the
footer: { FILENAME \p }, { DOCPROPERTY "Author" }, and { CREATEDATE }.
For { DOCPROPERTY "Author" } it is required that the name of the user is
in the Options dialog box (Tools>Options>User Information tab).

For more information about templates, see:

Creating a Template – The Basics (Part I)
http://word.mvps.org/faqs/Customization/CreateATemplatePart1.htm

What do Templates and Add-ins store?
http://word.mvps.org/faqs/customization/WhatTemplatesStore.htm

For more about fields, look them up in Word Help.
 

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

Back
Top