I found this old post/macro
Here, but it both gives an error and not sure if will do what I'm trying.
Is there any way to do a global search and replace of text to a Field Code? I have about 70+ tables in Word that are OLE links to an excel file.
An example of one looks like below
Code:
{ LINK Excel.SheetMacroEnabled.12 "C:\\Data\\Test WPS with Exam Highlights.xlsm" "Cover Charts!Charts_Cover_Main" \p }
and I want to replace both the File Path and File Name with Field Codes like below
Code:
{LINK Excel.SheetMacroEnabled.12 "{DOCPROPERTY WPFilePath}{DOCPROPERTY WPFileName}" "Cover Charts!Charts_Cover_Main" \p }
I tried using chr(19) and chr(21) in a replace, but still no luck yet.