Link to home
Start Free TrialLog in
Avatar of npasic
npasic

asked on

FilePath in Word 2003 or 2007 footer auto-update

How can I modify FilePath field in Microsoft Word document to update itself automaticaly if document changed it's location on the computer?
Please see attached file that has FilePath already inserted on the footer.
tde-letterhead.doc
Avatar of torimar
torimar
Flag of Germany image

Try this:

View > Header and Footer; place the cursor in the footer, then select Insert > Field; in Field Names select "FileName", then select the formatting you like and in Field Options put a check mark in "Add path to filename".
Avatar of npasic
npasic

ASKER

that is exactly what I did but it does not update that path automaticaly if the file is moved to another folder and than opened
True. Sorry for not having tested my suggestion before posting.

Since the footer is not selected when you Select All in a document, even a manual update via F9 will only work when you place the cursor right on the field. But you wanted an automativ update anyways. As far as I can see, this will require a VBA macro.

Fortunately, someone has already written the code for this. You'll find it here: http://www.vbaexpress.com/kb/getarticle.php?kb_id=459
together with very detailed instructions on how to proceed.

You will only need the Sub "UpdateFooter ()" or, alternatively, "UpdateFooter2()".

When everything works fine, you may consider adding the code to the AutoExec macro, so that it will perform automaticall on opening the document.
ASKER CERTIFIED SOLUTION
Avatar of benleicester
benleicester

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial