E
Ed from AZ
Okay - it's not specifically Word VBA, except that's what I'm familiar
with for a starting point.
I need to iterate through a folder of XML files, find a couple of
tags, and replace the values. That sounds really simple, but the only
way I can think of to do it in my current limited capabilities is to
use FSO to grab each file and read the contents, write all that into a
Word doc, use Word's wildcard Find/Replace, then grab all the text and
write it back into the XML file.
I'm thinking it would be much easier once I read each file's contents
into a string to just work within the string. I think maybe I
remember doing that once using Regular Expressions to find the
string?? But I hang up when I try to think of how to extract the
value from what I've found.
So if in the string, I have:
<TAG1>HI</TAG1>
and I need to replace HI with HELLO,
can I do all that within the string while it's in memory without
having to write it into a doc, play with it, and write it back out?
Ed
with for a starting point.
I need to iterate through a folder of XML files, find a couple of
tags, and replace the values. That sounds really simple, but the only
way I can think of to do it in my current limited capabilities is to
use FSO to grab each file and read the contents, write all that into a
Word doc, use Word's wildcard Find/Replace, then grab all the text and
write it back into the XML file.
I'm thinking it would be much easier once I read each file's contents
into a string to just work within the string. I think maybe I
remember doing that once using Regular Expressions to find the
string?? But I hang up when I try to think of how to extract the
value from what I've found.
So if in the string, I have:
<TAG1>HI</TAG1>
and I need to replace HI with HELLO,
can I do all that within the string while it's in memory without
having to write it into a doc, play with it, and write it back out?
Ed