Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
Sabrina Sabrina is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
insert footers in normal template Heidi Page Layout 7 March 1st 13 03:41 PM
Template does not pull in Headers and Footers Sandra Microsoft Word Help 4 September 25th 07 06:18 PM
How do I keep headers and footers in a template as email to fax italkfree Microsoft Word Help 3 November 27th 05 11:55 AM
Doc Template & headers and footers Linda G Microsoft Word Help 2 June 17th 05 11:42 PM
Template with several sections and different headers and footers Fredrik Eide Nilsen Page Layout 1 March 31st 05 12:17 PM


All times are GMT +1. The time now is 03:05 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"