Replacing an entire XML file within a .DOCX File

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

Replacing an entire XML file within a .DOCX File

Postby tonygardner » Sat Oct 27, 2012 5:03 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

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

Postby DataMystic Support » Mon Oct 29, 2012 11:31 pm

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.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

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

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

Postby tonygardner » Tue Oct 30, 2012 8:52 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

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

Postby DataMystic Support » Tue Oct 30, 2012 9:02 am

Hi Tony - why not the standard edition? $199
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

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

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

Postby tonygardner » Tue Oct 30, 2012 9:44 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

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

Postby DataMystic Support » Tue Oct 30, 2012 12:37 pm

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.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 5 guests