0
Reply

How to add text at a bookmark in a word document

chuck pareto

chuck pareto

Dec 29 2006 2:46 PM
2k
I'm trying to insert text at a bookmark that I've created in a word document. I'm using: Word.Bookmark bookmark1 = aDoc.Bookmarks.Add("supplier", ref range); bookmark1.Range.Text = "hello"; but this creates a new bookmark and adds the text to the range defined by the second parameter passed in. I don't want to create a new bookmark-I need to place text into a predefined bookmark. I wouldn't mind inserting text into a position on the word document if I knew the range, but the range is defined as a number ex. (start range, end range) and I can't seem to find a way to obtain those start and end ranges by moving my cursor in the word document. When I do this it only shows me a line number and column number. Any help will be great. Thanks, Chuck