I am inserting OLEDBObject from C# into word document. I used below code.
object classtype = Excel.XlSheetType.xlWorksheet;
object Bookmark = (int)Microsoft.Office.Interop.Word.WdGoToItem.wdGoToBookmark;
NameBookMark = obj.DocumentName;
if(NameBookMark != missing)
doc.GoTo(ref Bookmark, ref missing, ref missing, ref NameBookMark).InlineShapes.AddOLEObject(ref missing, ref linktofile, false, ref AsIcon, ref missing, ref missing, ref missing); //, ref rng);
The object gets inserted correctly. But I want the icon to appear as it’s file type. Means if the embedded object is of excel, then excel icon should be displayed. However icon without any image on it gets inserted like pasted below.
Can anyone suggest how to assign icon to this embedded object?
No comments:
Post a Comment