AndyAinscow
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)
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
ASKER
Great work guys, your help is appreciated.
ASKER