can footer default to having a warm FileName field always display?

K

keva house

Can I set up my Word so that every time I type any document whatsoever, that
the filename will appear as a footer?
 
J

Jay Freedman

On Wed, 1 Jul 2009 16:55:01 -0700, keva house <Keva
Can I set up my Word so that every time I type any document whatsoever, that
the filename will appear as a footer?

You can do that, as long as you don't ever use the Envelopes and Labels dialog
in the Mailings menu. Putting a footer in the Normal.dot template messes up the
spacing of labels so they don't align with the paper labels.

The "To add a header, footer, or other static text" section of the article at
http://www.word.mvps.org/FAQs/Customization/CustomizeNormalTemplate.htm explains
how to modify the Normal template. What you want is a FileName field (from the
Insert > Field dialog) in the footer.

There's a further complication: When you create a new document with this footer,
it will say something like "Document1" because an unsaved document doesn't have
a real filename. When you save the document for the first time, you give it a
filename, but the field won't automatically update. You can force it to update
by going to File > Print Preview and back, or by opening the footer and
right-clicking the field and choosing Update Field.
 
S

Suzanne S. Barnhill

Yes, but you really don't want to do this, as it requires putting content in
the footer of the Normal template, which is a Bad Idea.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
G

Graham Mayor

Personally I feel the best way to handle this is with a macro attached to a
toolbar button e.g. something along the lines of:

Sub InsertFilenameInFooter()
Dim iSec As Integer
Dim rFooter As Range
With ActiveDocument
If Len(.Path) = 0 Then .Save
iSec = .Sections.Count
Set rFooter = .Sections(iSec).Footers(wdHeaderFooterPrimary).Range
rFooter.InsertAfter vbCr & .FullName
With rFooter.Paragraphs(rFooter.Paragraphs.Count)
.Alignment = wdAlignParagraphRight
With .Range
.Font.name = "Arial"
.Font.Size = 8
End With
End With
End With
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
F

FranklinTN

Jay: Its hard to imagine Microsoft would make it so difficult to get a
filename, which is updated automatically when changed, into a footer.
In Excel, can easily add into a footer the filename/path and date fields.
When I save that excel file, the filename and date get updated. If I open up
that excel file, make modifications and save as under a different name, I do
not need to do ANYTHING within the footer. Automatically Excel changes the
footer to the new filename and date.

This seems like such an incredibly basic issue, where you'd want to create a
word doc and BY DEFAULT have a footer so when you save the file you always,
when you're looking at a printed version, know where to go and find the file
at some future date. But it sounds like its jumping thru hoops in word.
Surely there is an easy way? Also, even tho this thread is dealing with
word, what I wish is that every time I start with a blank spreadsheet or a
blank word doc, that there is ALREADY in the footer the filename and path so
I never have to worry about remembering where I save this. We have complex
directory structures for our files in the company and you cannot just save
all your word files in some personal, simple directory.
Thanks!!
 
J

Jay Freedman

Yes, it is hard to believe. As explained in
http://support.microsoft.com/?kbid=832897, Microsoft deliberately
disabled automatic updating of filename fields starting in Word 2002;
before that, they did update automatically. The reason stated in the
"Cause" section, if taken at face value, is utter nonsense. I assume
there's something else involved that they'd rather not state
publically, maybe related to security.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
R

Robert M. Franz [RMF]

Hello Jay

Jay said:
Yes, it is hard to believe. As explained in
http://support.microsoft.com/?kbid=832897, Microsoft deliberately
disabled automatic updating of filename fields starting in Word 2002;
before that, they did update automatically. The reason stated in the
"Cause" section, if taken at face value, is utter nonsense. I assume
there's something else involved that they'd rather not state
publically, maybe related to security.

I wonder about the AutoOpen macro: wouldn't it be easier (even: faster)
to simply switch to Print Preview and back than to iterate through story
ranges and fields?

0.02¢
Robert
 
J

Jay Freedman

Robert said:
Hello Jay



I wonder about the AutoOpen macro: wouldn't it be easier (even:
faster) to simply switch to Print Preview and back than to iterate
through story ranges and fields?

0.02¢
Robert

Yes, of course it would be both easier and faster to use Print Preview. But
I think we (collectively) know more about manipulating Word's behavior than
almost anyone writing KB articles at Microsoft. <g>

And if you were going to loop through the StoryRanges collection, the macro
presented in the KB article might miss some of the fields; you need the
tricks shown in
http://www.word.mvps.org/FAQs/Customization/ReplaceAnywhere.htm to get into
the nooks and crannies. The Print Preview approach makes that unnecessary.

To be certain that the Print Preview update will work, of course, you first
have to ensure that the option is set to update fields on printing.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
R

Robert M. Franz [RMF]

Hello Jay

Jay Freedman wrote:
[..]
Yes, of course it would be both easier and faster to use Print Preview. But
I think we (collectively) know more about manipulating Word's behavior than
almost anyone writing KB articles at Microsoft. <g>

yeah, well, the funny thing is that the article does mention switching
to Print Preview as a workaround further down ... :)


[..]
To be certain that the Print Preview update will work, of course, you first
have to ensure that the option is set to update fields on printing.

Yes. At least that part would be well mentioned in the workaround section!

Greetinx
Robert
 

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

Top