I have some VB.NET code that opens a Word document as an Aspose.Word.Document, then loops through all the nodes until it finds a certain keyword.
When It finds this keyword it needs to be able to insert an image at that point in the code, but so far I’ve only been able to find code examples that build a word document from scratch using DocumentBuilder, or inserting into the page using absolute coordinates.
Is there a method available that can insert directly to the currently selected node?
I can do this to insert external word documents using the InsertDocument example, just not images.
Thanks for your query. Please use the MoveTo method of DocumentBuilder class. You can move to a node by using MoveTo method. Please also read all method of DocumentBuilder.MoveToXXX.
In the end, I had to create a temporary document, assign a document builder to it, add the image to that document then add that document to my original document using the InsertDocument function.