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

Free Support Forum - aspose.com

Issue in linking OLE object to docx

Hi,

I am using the below code to link an OLE object to docx.
But when I open docx in MS-WORD and click on OLE object , i am getting the error that object is corrupt, but the same thing when I am doing manually in MS-WORD is working fine. I have checked document.xml after extracting and its showing <o:OLEObject Type=“Embed” ProgID=“Word.Document.8” ShapeID="_x0000_i1025" DrawAspect=“Icon” ObjectID="_0" r:id=“rId5”/>

Please look into it

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape oleObject = builder.insertOleObject("http://localhost/a.php", true, false, null);
doc.save("/home/madhur/Documents/yatin_Resume6.docx");

Hi,

I am using the below code to link an OLE object to docx.
But when I open docx in MS-WORD and click on OLE object , i am getting the error that object is corrupt, but the same thing when I am doing manually in MS-WORD is working fine.

Please look into it , attached the doc

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape oleObject = builder.insertOleObject("http://localhost/a.php", true, false, null);
doc.save("/home/madhur/Documents/yatin_Resume6.docx");

thanks,
madhur

as discussed on chat, attaching 2 docx
1 created using aspose and other created manually in ms-word

extracted both the docs , analyzed document.xml:
getting
<o:OLEObject Type="Embed" ProgID="Package" ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_0" r:id="rId5"/>
in docx from aspose

and
<o:OLEObject Type="Link" ProgID="htmlfile" ShapeID="_x0000_i1025" DrawAspect="Content" r:id="rId5" UpdateMode="Always">

in docx created from ms-word

Hi there,

Thanks for your inquiry. I have tested the scenario and have found the following issues at my side. For the sake of correction, I have logged these
problems in our issue tracking system as follow:

WORDSNET-11274 : DocumentBuilder.InsertOleObject method (String, Boolean, Boolean, Image) does not insert the linked OLE (the OLE is inserted with type as embed)
WORDSNET-11275 : InsertOleObject inserts incorrect ProgID in output document (The ProgID is package in output document which is incorrect)

Moreover, I have logged a feature request as WORDSNET-11276 to insert linked webpage OLE as shown in manually.docx. I
have linked this forum thread to the same issues and you will be
notified via this forum thread once these issues are resolved.

We apologize for your inconvenience.

thanks for the quick response.

Hopefully the fixes will be done in wordsjava also.
Any tentative estimate for the same.

thanks,
madhur

Hi Madhur,

Thanks
for your inquiry. Yes, these issues will be fixed in both Aspose.Words for Java and .NET.

Currently, your issues are pending for analysis and are in the
queue. I am afraid, I can’t provide you any reliable estimate at the
moment. Once your issue are analyzed, we will then be able to provide you
an estimate.

Please let us know if you have any more queries.

Hi Madhur,

madhur2928:

*1 created using aspose and other created manually in ms-word

extracted both the docs , analyzed document.xml:
getting
<o:OLEObject Type=“Embed” ProgID=“Package” ShapeID="_x0000_i1025" DrawAspect=“Content” ObjectID="_0" r:id=“rId5”/>
in docx from aspose

and
<o:OLEObject Type=“Link” ProgID=“htmlfile” ShapeID="_x0000_i1025" DrawAspect=“Content” r:id=“rId5” UpdateMode=“Always”>

in docx created from ms-word*

Could you please share the steps which you used to create manually.docx here for our reference? Thanks for your cooperation.

The issues you have found earlier (filed as WORDSNET-11275) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-11274;WORDSNET-11276) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.