Link to home
Start Free TrialLog in
Avatar of AndyAinscow
AndyAinscowFlag for Switzerland

asked on

Custom field in word 2010 template - how to?

In a small network with a handful of users but some sharing of PC's there is now a requirement to show the logged in user as the creator of a word document based on a centrally located template.
So it would be nice to have a field in the template (eg. in the footer) which will get the login name of the user when the template is used to create a new document.  There is a tiny problem, the login names are in the format of John.Smith or Harry.Brown so the '.' needs to also be replaced with a space.

I can insert a field, what do I need to do to get the login name AND then replace all instances of '.' with a space in that retrieved name to put into that field at the time of document creation.  (I don't want this information changing should another user edit the document at a later time.

(In theory one could go to each PC, login as each potential user and change a setting in the options for word - but that is a horrible looking hack and waste of time and resources)
SOLUTION
Avatar of Phillip Burton
Phillip Burton

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
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of AndyAinscow

ASKER

Thanks for the responses.  Hmm, not as trivial as I expected.  I'll see if I can get it tested today.
I've got it to work here on a single PC, it has been passed on for testing (by my tame tester) in situ in the real life network.  I'll close this / ask for further advice when I get a response back.


ps.  Please cast a glance at:
https://www.experts-exchange.com/questions/28523653/Word-2010-can-I-remove-VBA-code-from-a-document-to-allow-it-to-be-saved-as-docx-without-warning.html
It is a follow up to this question.
Great work guys, your help is appreciated.