Link to home
Start Free TrialLog in
Avatar of Nat Wallis
Nat WallisFlag for Australia

asked on

Bulk change "Field" variable in Word

I am updating some of our internal documentation.

I use a number of "DocProperty" or Advanced Property\Custom variables in my document.

I am trying to re-organise and standardise naming.

What I need to do is replace all fields with the "DocProperty" value of "IPADDRESS" to the new "DocProperty" value of "1IPADDRESS"

I can manually go thru, select the field, change but with a LOT of these that is very painful.

Wondering if there is a way to make this process a bit easier.

I am using MS Word 2013 SP1
Avatar of Nat Wallis
Nat Wallis
Flag of Australia image

ASKER

Also, I thought I might be able to change the name of the variable, but if I do that it will just add a new variable so unfortunately that isn't possible.
Avatar of Rgonzo1971
Rgonzo1971

Hi,

You can change the variable Name with VBA without adding a property

ActiveDocument.CustomDocumentProperties("IPADDRESS").Name = "1IPADDRESS"

Regards
Thanks,

Sorry I think I wasnt very clear, is there a way to replace the field in the document.

I have in the document both IPADDRESS and 1IPADDRESS.

I want to change any field variables that are looking at "IPADDRESS" to be changed to "1IPADDRESS"

Not sure if that makes sense.
ASKER CERTIFIED SOLUTION
Avatar of Let's Go
Let's Go
Flag of Australia 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
Thanks very much, that has done the job very nicely :-)