Hi,Support:
What is the method to insert Word document to a main document and shown as ico?
Thanks for your help.
Hi,Support:
What is the method to insert Word document to a main document and shown as ico?
Thanks for your help.
Please use the DocumentBuilder.InsertOleObjectAsIcon method to insert an embedded or linked OLE object (Word, Excel files etc) as icon into the Word document. It allows to specify icon file and caption. Sample code is as follows:
Document doc = new Document("C:\\temp\\input.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToDocumentEnd();
builder.Writeln();
builder.InsertOleObjectAsIcon("C:\\temp\\a word file.docx", true, "C:\\Temp\\an icon file.ico", "an icon caption");
doc.Save("C:\\temp\\20.9.docx");
Thanks for your reply.
Howver, I try builder.InsertOleObjectAsIcon(DocFile, true, DocIcoFile, DocFilenameWithExt), there is no any file embedded as ico in the output based on Aspose.word.dll(v20.7) and based on VB.net
2008.
I try another way by old version V18.7 like this builder.InsertOleObject(Stream, FileName, True, IcoFileImg), this can embed doc inserted to main doc and shown as ico, but the ico caption is missing, how to fix it, Or how to display the ico caption with filename?
doc.Save(“C:\temp\20.9.docx”);
We suggest you to please upgrade to the latest 20.9 version of Aspose.Words for .NET and see how it goes on your end? In case the problem still remains, please ZIP and attach the following resources here for testing:
As soon as you get these pieces of information ready, we will start further investigation into your particular scenario/issue and provide you more information.