the imagedata property after assigned a image byte[], this image will always show up when user first open the excel sheet, after user click and resize the image, the embeded word document show up ,
btw,the domo or sample also show a image first .
1) can we show the embeded word documnet straight forward in the excelsheet?
2) when i manully insert 'objects' in excelsheet, it working correctly and show embeded word document at once after insert. do i missed some setting in programming?
below are my code
Dim ImageUrl As String = imagepath & "icon.jpg"
Dim fs As FileStream = File.OpenRead(ImageUrl)
Dim imageData(fs.Length) As Byte
fs.Read(imageData, 0, imageData.Length)
fs.Close()
fs = File.OpenRead(docfile)
Dim DocData(fs.Length) As Byte
fs.Read(DocData, 0, DocData.Length)
fs.Close()
ws.OleObjects.Add(nline, 0, 100, 200, imageData)
ws.OleObjects(0).FileType = Aspose.Cells.Drawing.OleFileType.Doc
ws.OleObjects(0).ObjectData = DocData
ws.OleObjects(0).SourceFullName = docfile
ws.OleObjects(0).DisplayAsIcon = False
ws.OleObjects(0).ProgID = "Document"
ws.OleObjects(0).MoveToRange(nline, 0, nline + 15, 8)