-1

I have MS Word template with content inside. In the middle of the content I have a specific bookmark that I want to replace with HTML file (not the tags view, all the visual view). What is the easiest way to do it? I found the option to insert a file but couldn't find to insert it to a specific place instead of a bookmark. Thanks.

1
  • Has your question been answered? Commented Nov 15, 2018 at 12:50

1 Answer 1

0

Use a Range object with the InsertFile method. For example the following code will insert a file where the bookmark is:

Word.Range rngBookmark = wdDoc.Bookmarks["test"].Range;
rngBookmark.InsertFile(filePath);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.