>I'm trying to search for various strings of text in a document and if a
>string is found, then inserting a block of text that's triggered by that
[quoted text clipped - 8 lines]
>
>Roger Marrs
Hi Roger,
After you set up the Find object, do something like this:
If .Execute Then
ActiveDocument.Bookmarks("Bookmark1").Range.Text = Variable1
End If
This simple version clobbers the bookmark as it inserts the text. If
you need to have the bookmark still present after the insert, see
http://www.word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
Roger Marrs - 04 Jan 2006 17:50 GMT
That worked great. Thank you.
> >I'm trying to search for various strings of text in a document and if a
> >string is found, then inserting a block of text that's triggered by that
[quoted text clipped - 27 lines]
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.