Billy Bunter
05-07-2007, 07:03 AM
Hi All
I have a bug to fix and I need to do some VBA work - something I haven't done before.
I need to parse a Word Doc, search for a particular string pattern, and assign the value of that string pattern to a variable within the loop (to do something else with it). I can see from existing code that the following is used to find something: ActiveDocument.Content.Find.Execute...
but I also need it to return what it finds. The string pattern is this:
{{some_text_value_here}}
So, I need the code that loops through the doc, search for the pattern, and assigns that value of the pattern to a variable.
Can someone help - I'm sure it's just a few lines of code.
Many thanks
--Billy Bunter
I have a bug to fix and I need to do some VBA work - something I haven't done before.
I need to parse a Word Doc, search for a particular string pattern, and assign the value of that string pattern to a variable within the loop (to do something else with it). I can see from existing code that the following is used to find something: ActiveDocument.Content.Find.Execute...
but I also need it to return what it finds. The string pattern is this:
{{some_text_value_here}}
So, I need the code that loops through the doc, search for the pattern, and assigns that value of the pattern to a variable.
Can someone help - I'm sure it's just a few lines of code.
Many thanks
--Billy Bunter