Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2016, 08:55 AM
namedujour
Guest
 
Posts: n/a
Default Can field dynamically update?

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.
Reply With Quote
  #2  
Old 03-04-2016, 11:09 AM
Charles Kenyon Charles Kenyon is offline Can field dynamically update? Windows 8 Can field dynamically update? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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:
Reply With Quote
  #3  
Old 03-04-2016, 10:21 PM
macropod's Avatar
macropod macropod is offline Can field dynamically update? Windows 7 64bit Can field dynamically update? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can field dynamically update? Have Powerpoint dynamically update from an excel or other file? 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
Can field dynamically update? Auto update Filename field Oliver Beirne Word VBA 4 10-19-2012 03:33 AM
Can field dynamically update? How do I dynamically update data in a Word Document from a database table RSchmidt Word 1 07-14-2011 04:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft