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

Free Support Forum - aspose.com

How to embed ole bin file to docx file

We have extract bin file from some other application. The bin file is ole. Now my requirement is - how to extract file from the bin file? Is there any way to extract file from bin file?

Optionally, I have decided following solution:
1. Embed the ole file to docx.
2. Then extract the actual files from this docx file.
I have seen examples extracting files from ole objects of docx file. But have not found any examples for embedding the ole file to docx. Please share us if there is any.

Thanks.
Prakash

Hi

Thanks for your request. Unfortunately, there is no way to embed OLE objects into documents using Aspose.Words. But you are right, you can extract embedded OLE objects from document. Aspose.Words does not allow modified existing and embedding new OLE objects into Word documents. Using Aspose.Words you can only extract existing OLE objects from the document.

Best regards,

Hi Alexy,

Thanks for your quick response.

Now, I have decided to extract ole attachments from the docx file for that
I have used sample program from following links
How to Extract embedded non-office ole object like zip file

I have few question regarding that sample.
1. Can’t we know the name of the attachments?
2. Can’t we know the extention of the attached file rather than using switch case on share.OleFormat.ProgId?

Thanks,
Prakash

Hi

Thanks for your request.

1. You can get source file name if the OLE object is linked. If the object is embedded, you cannot get the source file name:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.drawing.oleformat.sourcefullname.html

2. You can use SuggestedExtenssion for this:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.drawing.oleformat.suggestedextension.html

Best regards,