Jump to content

replacing %tags% in a word document


jake2891

Recommended Posts

Hi, im trying to replace tags in a word document using a php script i wrote.

 

for example ill have the tags like this %tag_to_replace% the problem is that when ever i upload the document and view the xml source the tag has been split up into 4-5 different lines depending on the length of the tag. So when i come to search for the tag in my php and replace it, it cant match it up because the tag looks something like this.

%

some xml tags

tag_

some xml tags

to

some xml tags etc..

 

I know word sees this tag as an error and puts most of the tags between error tags so ive done some formatting of my own using php to try fix this as best as possible but i cant accomidate for all the different types of situations every document seems to be different.

 

has anyone ever had to deal with this and knows a way around this or does anyone know of a script available to fix this?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/158636-replacing-tags-in-a-word-document/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.