We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IconCaption is blank

Hi,


When embedding ole object in to a document the [IconCaption] is not being set on OleFormat object. Is there a workaround?

void Main()
{
var doc = new Aspose.Words.Document();
var builder = new DocumentBuilder(doc);
builder.MoveToDocumentEnd();
foreach(var file in Directory.GetFiles(“C:\Downloads”))
{
var icon = Icon.ExtractAssociatedIcon(file);
var ext = Path.GetExtension(file).ToLower();
var progid = “Package”;
switch (ext)
{
case “.xls”:
progid = “Excel.Sheet.8”;
break;
case “.xlsx”:
progid = “Excel.Sheet.12”;
break;
case “.pdf”:
progid = “Package”;
break;
case “.doc”:
progid = “Word.Document.8”;
break;
case “.docx”:
progid = “Word.Document.12”;
break;
}
using(var bmp = icon.ToBitmap())
{
var shape = builder.InsertOleObject(file, false, true, bmp);
}
}
doc.Save(@“C:\Publish\out.docx”);
}

Hi Maxim,


Thanks
for your inquiry. Unfortunately, Aspose.Words does not support the
requested feature at the moment. However, I 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.

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.