EDN Admin
Well-known member
Im trying to insert text at a bookmark that Ive created in a word document. Im using:
<span style="font-weight:bold 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 dont want to create a new bookmark-I need to place text into a predefined bookmark.
I wouldnt 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 cant 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<span style="font-weight:bold
View the full article
<span style="font-weight:bold 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 dont want to create a new bookmark-I need to place text into a predefined bookmark.
I wouldnt 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 cant 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<span style="font-weight:bold
View the full article