Scott
Scott

Reputation: 181

Use MS-Word Field code to replace text from variable

I have written a document that uses variables in field codes, so when the system is updated, I only need to update one location in the document. i.e.: {Set SWVersion "3.5.2" \*MergeFormat}

I'm hoping to use this same field in a file naming convention description in the document, but need to replace . with _. e.g. Name your file Project_V3_5_2_Stage1

I was hoping for something like {Replace SWVersion "." "_" \*MergeFormat}.

Does any such function exist? Would I need a macro? I've searched through the help files and didn't spot any replace function. So I guess I'd need a second field, and a macro that updates the value of the second field based on the first?

Thanks for your help.

Upvotes: 0

Views: 164

Answers (0)

Related Questions