Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
JGT JGT is offline
external usenet poster
 
Posts: 34
Default Footer field (filename) changes font size Word 2007

I really have two questions - I'm running Word 2007 Enterprise on my Vista
Business x64 system.
(Q1) In my normal.dotm I've added a footer that contains a field (Filename)
and the page number "Page X of Y". Is there a way that I can get the field
(Filename) to automatically update when the file is saved? Currently I open
the footer, position my cursor next to the filename and press F9 to update
the document with the filename of the document.
(Q2) The footer in the template font size is 8pt, when I press F9 to update
the filename, part of the filename font size will change. How do I force it
to stay at 8pt?
  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Footer field (filename) changes font size Word 2007

Several issues here

1. It is not a good idea to put fields (or anything else) in the
header/footer of the normal template. Not only does it not work as you
intend, because the field will not update automatically, but it interferes
with the use of the normal template for some of its base functions, eg
making labels.
The better options are to create a document template and use that for those
documents that require a filename etc., or to insert the header/footer using
a macro. eg

Sub AddFooter()
Dim oFooter As Range
Dim oRng As Range
Set oFooter =
ActiveDocument.Sections(1).Footers(wdHeaderFooterP rimary).Range
If Len(ActiveDocument.Path) = 0 Then
ActiveDocument.Save
End If
oFooter.Select
Set oRng = Selection.Range
With Selection
.Paragraphs.Alignment = wdAlignParagraphCenter
.TypeText "Page "
.Fields.Add Range:=Selection.Range, _
Type:=wdFieldPage, _
PreserveFormatting:=False
.TypeText " of "
.Fields.Add Range:=Selection.Range, _
Type:=wdFieldNumPages, _
PreserveFormatting:=False
.TypeParagraph
.Paragraphs.Alignment = wdAlignParagraphRight
.Fields.Add Range:=Selection.Range, _
Type:=wdFieldFileName, _
Text:="\p", _
PreserveFormatting:=False
End With
oRng.End = Selection.Range.End
oRng.Font.name = "Arial"
oRng.Font.Size = 8
With ActiveDocument.ActiveWindow
.View = wdPrintView
.View.SeekView = wdSeekMainDocument
.View = wdPrintView
End With
End Sub
http://www.gmayor.com/installing_macro.htm

2. You can update fields using the sample macro at
http://www.gmayor.com/installing_macro.htm attached to a button on the QAT
(Quick Access Toolbar)

3. To retain the formatting of the field, add a charformat switch (in place
of any mergeformat switch that may be there)-
http://www.gmayor.com/formatting_word_fields.htm .The macro above will
format the footer as 8 points Arial


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



JGT wrote:
I really have two questions - I'm running Word 2007 Enterprise on my
Vista Business x64 system.
(Q1) In my normal.dotm I've added a footer that contains a field
(Filename) and the page number "Page X of Y". Is there a way that I
can get the field (Filename) to automatically update when the file is
saved? Currently I open the footer, position my cursor next to the
filename and press F9 to update the document with the filename of the
document. (Q2) The footer in the template font size is 8pt, when I
press F9 to update the filename, part of the filename font size will
change. How do I force it to stay at 8pt?



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
Form Text Field Won't Change Font Size-Word 2007 DP Microsoft Word Help 3 March 3rd 09 01:06 AM
Filename Font Size DPete14 Microsoft Word Help 2 August 11th 08 05:05 PM
Filename and Path in footer in Word 2007 Maggie Microsoft Word Help 1 July 25th 07 06:01 AM
Word 2007 Footer - Path and Filename dslocum Microsoft Word Help 2 March 8th 07 09:42 PM
Inserting filename in footer in Word 2007 Ron G Microsoft Word Help 9 September 11th 06 04:58 AM


All times are GMT +1. The time now is 12:49 AM.

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"