Office Software Thread, Automatically Updating Field Codes in Technical; I'm (still) trying to get a person's name into the footer of every new Word document that's created. I thought ...
17th May 2010, 01:13 PM #1
Automatically Updating Field Codes
I'm (still) trying to get a person's name into the footer of every new Word document that's created. I thought I had it cracked until I noticed that Word only updates some field codes when you print. So whist if someone prints/pront priviews a document their username changes until they do it has my name in the footer. I could enter somthing random like "your username will be inserted here" but I don't want to. I want to have their username from the word go.
I've been looking on google and I can't see a way to force the codes to auto update without using a Macro? Is there a way for force a field to update all the time the same way the data does?
I've used the record macro feature to record a macro to update the field codes if you go to file and new (AutoNew) or open an exiisting document (AutoOpen). The problem is that I can't get it to work for the document that opens when you first click on Word. If I create an "AutoExec" macro it fails, presumably because the document isn't open. I've included my macor below. Any ideas how to get it to work when I start a new Word?
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
17th May 2010, 01:38 PM #2
Can you add a macro to the template i.e. normal.dot and then it will be the default for all new instances of word. in 2007, it is called normal.dotm i think.
17th May 2010, 02:24 PM #3
Actually, you probably wont need a macro, if you can edit the normal.dotm and put it on everyone's machine, or set their profiles to use your modified one.
17th May 2010, 02:49 PM #4
Your right it is .dotm. And I have been forced into macro's as the cant get the code to auto update when I want it by itself.
The problem is that my Macro works when existing documents are opened. The Macro works when New documents are created (Office Button, New) but it doesn't work when you click on the Word Icon and open Word and are presented with a document. I can't seem to work out where to put it to make it work.
the field code will update when you print which is OK ish.... but I want it to be perfect to help the hard of thinking.
17th May 2010, 02:57 PM #5
That's where I went first. The problem is that it then had MY name in the footer until the user perfoms an action to update the field codes. These mostly seem to be print/print preview. Until that point my name is going to be on the bottom of the document which is going to confuse...
Originally Posted by vikpaw
17th May 2010, 02:57 PM #6
But, can't you put a macro into a template. if not, if you add the field code into the template, then just opening Word, will default to a new blank document with the field code applied.... wont it?
Other than that, tell them to do a Ctrl+A and then F9 to force update. but you have to be in the footer if the field is in the footer for this to work.
17th May 2010, 03:00 PM #7
ok, i think i got ya now. what if you put it in that mode where it displays the code not the value / result. i don't suppose that helps.
it's bizarre, that it resolves the value and saves it into the template.
maybe you could set the template up with an account that is called "user" so at least it's not a name until they update...
17th May 2010, 03:29 PM #8
I've resoted to rediting my registry to have the details "You name will be entered here".
I have an AutoOpen Macro which updates the code for documents as they are opened. I have an AutoNew which updates new documents when they are created for file New. I tried AutoExec for when Word was opened but it executed prior to the document opening so just errors (you can't selecet and update things that are not open!)
17th May 2010, 03:45 PM #9
:O) shame. maybe there's an office tool kit tool that can help, or it's fixed in 2010. if i remember i'll take a look tomorrow.
By Tamarside in forum Netbooks, PDA and Phones
Last Post: 9th February 2009, 02:33 PM
By Athlona in forum Windows
Last Post: 16th October 2008, 06:10 PM
By link470 in forum Windows
Last Post: 17th December 2007, 06:15 PM
By Teaboy in forum MIS Systems
Last Post: 10th December 2007, 05:48 PM
By callumtuckey in forum General Chat
Last Post: 24th August 2007, 10:52 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)