Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
template in footers
I need the filename to appear as a footer on each document that is created.
Can this be done in template? I need it to be automatic. |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
template in footers
It all depends on your definition of 'automatic'.
When you create a document it doesn't have a name until you first save it. Filename fields can be inserted in the document footer, but they don't 'automatically' update unless you provide the conditions for them to do so - eg by switching to print preview. You can add a filename field to a template (not please to the normal template) and create documents from that template, albeit with the proviso just mentioned, or you can use a macro to save the document and add the chosen filename to the footer e.g. Sub InsertFilenameinFooter() With ActiveDocument If Len(.Path) = 0 Then .Save End If End With Selection.EndKey Unit:=wdStory ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter With Selection .ParagraphFormat.Alignment = wdAlignParagraphRight .TypeText ActiveDocument.FullName End With ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument End Sub Replace .FullName with .Name if you don't want the path included. http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Sabrina wrote: I need the filename to appear as a footer on each document that is created. Can this be done in template? I need it to be automatic. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert footers in normal template | Page Layout | |||
Template does not pull in Headers and Footers | Microsoft Word Help | |||
How do I keep headers and footers in a template as email to fax | Microsoft Word Help | |||
Doc Template & headers and footers | Microsoft Word Help | |||
Template with several sections and different headers and footers | Page Layout |