![]() |
#1
|
|||
|
|||
![]()
I inserted a field into a file footer with Insert>Quick Parts>Field. I selected FileName.
This file is a .docx file that contains custom styles and macros, etc. I use it as a template. When I create a new file from that template, I change the file name. However, the footer field retains the file name for the template, and doesn't update to show the new name. I know there are fields that dynamically update dates. Does anything work with the file name? Thanks PS. My quick-and-dirty fix was to create a macro that opens the footer and inserts the field. However, I'd like to eliminate those keystrokes, if possible. |
#2
|
|||
|
|||
![]()
First, when you create a new document, there is no name. Saving the document does not update the field, print preview should. It would be easy to have an AutoOpen macro in your document that updates any filename fields. See Installing Macros.
The following may be of interest to you: |
#3
|
||||
|
||||
![]()
Since you're already using macros, you might call one like the following via a Document_Open & Document_New macro in the template:
Code:
Sub UpdateFields() Application.ScreenUpdating = False With ActiveDocument .Fields.Update .PrintPreview .ClosePrintPreview End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
oshkosh | PowerPoint | 3 | 04-05-2016 06:10 AM |
Can you make templates dynamically update macros/etc. from Normal.DOT? | New Daddy | Word | 2 | 11-18-2013 09:07 AM |
Dynamically update charts from SQL Server Database | markcellis | PowerPoint | 0 | 12-26-2012 06:05 AM |
![]() |
Oliver Beirne | Word VBA | 4 | 10-19-2012 03:33 AM |
![]() |
RSchmidt | Word | 1 | 07-14-2011 04:27 PM |