Replacing an entire XML file within a .DOCX File

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
tonygardner
Posts: 3
Joined: Sat Oct 27, 2012 3:26 am

Replacing an entire XML file within a .DOCX File

Post by tonygardner »

Hello.
I have about 300 or so files that need to have the footer completely changed, including text, fields and formatting. I got one file setup just the way I want it, and now want to populate this change into all the other docs.

If I unzip a .DOCX file, I see that it is comprised of several .XML files. The information in my footer seems to reside in footer1.xml and footer2.xml.

I'm wondering if it's possible to drop those two XML files and overwrite them in all the other docs.

I suppose I could try to do a text search and replace, but this way seems so much cleaner to me.

Any thoughts?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Replacing an entire XML file within a .DOCX File

Post by DataMystic Support »

Hi Tony,

You have to do a search/replace - TP does not do file replacement.

Try using Filters\Restrict\Restrict to filenames matching pattern list, with a perl pattern of

Code: Select all

footer[12].xml$
And inside this, a Remove All filter, followed by an Add Header, with the new text.
tonygardner
Posts: 3
Joined: Sat Oct 27, 2012 3:26 am

Re: Replacing an entire XML file within a .DOCX File

Post by tonygardner »

Thanks Simon. Apparantly, my Lite version won't cut the mustard on this one.

Since I'm such a cheapskate :oops: I'll have to find another way to do the job.

One day when I'm rich :mrgreen: I'll upgrade to PRO!

Cheers,
Tony G.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Replacing an entire XML file within a .DOCX File

Post by DataMystic Support »

Hi Tony - why not the standard edition? $199
tonygardner
Posts: 3
Joined: Sat Oct 27, 2012 3:26 am

Re: Replacing an entire XML file within a .DOCX File

Post by tonygardner »

Simon, you truly have an amazing product here. There is no doubt in my mind that TextPipe is worth every penny. In fact, we recently opted to change our primary mail merge data source to use all new field names. TextPipe Light was able to easily do the job of converting thousands of tags from the old names to the new ones. Very impressive!

Regarding upgrading to TextPipe Standard, it took New Creation Music a year to justify purchasing the Lite version because the task would have taken well over 100 hours to complete. For changing the footers, however, I will be using a product called Keyboard Maestro (Mac) to create a macro to loop through all the documents and change their footers one at a time (estimated total time is four hours for development and execution).

For the record, we will most likely be purchasing the run-time version early next year to distribute along with our new SageCharts solution.

All The Best,
Tony Gardner
New Creation Music
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Replacing an entire XML file within a .DOCX File

Post by DataMystic Support »

Thank you very much Tony,
a year to justify purchasing the Lite version because the task would have taken well over 100 hours to complete
A year to justify an expenditure of $29? Mixed priorities I think!

Let me know what your needs are for the Run Time version - we have a lot of developer partners who include TextPipe in their apps.
Post Reply