Outlook.msg attachment

When I insert the Outlook.msg attachment to word document using the following

Dim oleObject As Shape = docBuilder.InsertOleObject(filePathName, False, True, Nothing)

The attachment shown as an open box with the text

Hi Dzung,

Thanks for your inquiry. Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate as to how you want your final Word output be generated like. We will then provide you more information on this along with code.

Attached is the word with Outlook attachment

Hi Dzung,

Thanks for sharing the document. Unfortunately, Aspose.Words does not provide APIs to set icon caption of OLE object. However, we have logged this feature request as WORDSNET-11833 in our issue tracking system. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

Please use following code example to insert OLE object from a file into the document. Hope this helps you.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Image image = Image.FromFile(MyDir + "msg.png");
builder.InsertOleObject(MyDir + "Testing Outlook.msg", "Package", false, true, image);
builder.Write(ControlChar.LineBreak + "Testing Outlook.msg");
doc.Save(MyDir + "Out v17.1.0.docx");

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.

The issues you have found earlier (filed as WORDSNET-11833) have been fixed in this Aspose.Words for .NET 20.1 update and this Aspose.Words for Java 20.1 update.