I have a Word document, that is configured for mail merge.
The data source for the mail merge, is a complicated Excel workbook, containing numerous queries and database connections.
I need to rename the Excel workbook (filename), but I don't want to have to reconfigure the data connection in Word (the tables and queries are complicated, and I'll probably break it).
Is there a simple way for me to change only the filename specified in the data connection, without modifying any other parts of the data connection?
Answer
If it is docx format, then it can be done with following way:
Extract xml(s)
From it search for all occurrences file name in its contents and replace for new file name
Then pack again.
You can unpack with standard archiver that supports zip archives
No comments:
Post a Comment