A
Andy
Hi All,
I have a Word document that has strings in it of the form "dd1",
"dd2", "dd3", "dd4", etc. each of which represents locations where
variable data will be inserted into the document. Some of these
strings are in Word table cells and some are in Word paragraphs. What
I would like to do is within VB.Net replace all of the above mentioned
strings with actual data values from a .Net dataset. So basically I
want to traverse the Word document from beginning to end only ONCE and
everytime I find a string of the form "dd1", "dd2", etc. as mentioned
above I want to replace it with a value from a .Net dataset. So at
the same time that I'm looping through the Word document I'm looping
through my .Net dataset as well. So it's something like this . . .
1. Start at beginning of document.
2. Search for 1st string like "dd1", "dd2" etc.
3. When found replace it with an item in the first row of the dataset
4. Find the next string like "dd1", "dd2" etc.
5. When found replace it with an item in the next row of the dataset
and so on …
I would like to use VBA in .Net to do this and I was wondering if
anyone out there could help get me pointed in the right direction.
Thanks in advance,
Andy
I have a Word document that has strings in it of the form "dd1",
"dd2", "dd3", "dd4", etc. each of which represents locations where
variable data will be inserted into the document. Some of these
strings are in Word table cells and some are in Word paragraphs. What
I would like to do is within VB.Net replace all of the above mentioned
strings with actual data values from a .Net dataset. So basically I
want to traverse the Word document from beginning to end only ONCE and
everytime I find a string of the form "dd1", "dd2", etc. as mentioned
above I want to replace it with a value from a .Net dataset. So at
the same time that I'm looping through the Word document I'm looping
through my .Net dataset as well. So it's something like this . . .
1. Start at beginning of document.
2. Search for 1st string like "dd1", "dd2" etc.
3. When found replace it with an item in the first row of the dataset
4. Find the next string like "dd1", "dd2" etc.
5. When found replace it with an item in the next row of the dataset
and so on …
I would like to use VBA in .Net to do this and I was wondering if
anyone out there could help get me pointed in the right direction.
Thanks in advance,
Andy