View Single Post
 
Old 01-03-2015, 07:36 AM
ptmuldoon ptmuldoon is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Sep 2014
Posts: 93
ptmuldoon is on a distinguished road
Default Copying Raw Field Codes

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.

Last edited by ptmuldoon; 01-03-2015 at 08:45 AM.
Reply With Quote