If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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? |
Thread Tools | |
Display Modes | |
|
|