Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Thanks Graham. I didn't need the macro, just adding the "\*Charformat"
switch in the field did the trick. Worked like a charm. Dan "Graham Mayor" wrote: The following macro will update only the filename field when you save the document. Copy the macro and save it with the name FileSaveAs to ensure it updates if you change the filename: Sub FileSave() Dim oField As Field Dim oSection As Section Dim oFooter As HeaderFooter ActiveDocument.Save For Each oSection In ActiveDocument.Sections For Each oFooter In oSection.Footers If oFooter.Exists Then For Each oField In oFooter.Range.Fields If oField.Type = wdFieldFileName Then oField.Update End If Next oField End If Next oFooter Next oSection End Sub http://www.gmayor.com/installing_macro.htm The font size issue can be overcome by opening the footer and toggling the field display with ALT+F9 to show {Filename \p} add a charformat switch within the brackets thus {Filename \p \*Charformat} then update the field (F9) and if necessary toggle the display again to show the result. See http://www.gmayor.com/formatting_word_fields.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org DPete14 wrote: I have created a template (M$ Word 2007), and have inserted a field in the footer to have the filename with path. I have set options to update fields before printing. When a new document is created using this template, the document is saved to give it a real file name, and then the document is printed, the filename field changes font size to 11pt, which is the "Normal" size, even though when I set up the filename field I told it to be 8pt. How can I get the field to update and stay the same size? |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
my font and even page size keep changing size in Word 2007 | Page Layout | |||
Font size of footer changes from size set in normal template | Microsoft Word Help | |||
The lettering or font size prints smaller than the selected size o | Microsoft Word Help | |||
Size of superscript and subscript characters relative to Font size | Microsoft Word Help | |||
set the font type,font size automatically when start up? | Microsoft Word Help |