I would like to dynamically insert OLEObject link inside a Word document and I also would like to set the caption of the icon representing this link. Does Aspose provide a way to do it?
Thanks for your inquiry. Unfortunately there is not way to insert embedded or linked objects. But you can try inserting LINK field. See the following code example:
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.InsertField("LINK Word.Document.8 \"C:\\\\Temp\\\\in.doc\" \"\" \\a \\f 0 \\p", "doc"); doc.Save(@"Test287\out.doc");
But note that Aspose.Words doesn’t update this field so you should update fields inside the document manually (ctrl+A and F9). Also you can use macro to update fields. See the following link to learn more.
Also you there is no way to specify an icon that will be displayed and its caption.