Page 1 of 1

Insert a zip file in my docx

PostPosted: Sat Mar 29, 2014 1:49 am
by ivanmz
Hello all,

I would like to know if there is a way to insert an object (zip file) into my docx file.

I looked into examples but still is not clear because most of the examples make a link to the file but I want that the file (zip) be embedded in my docx.

Regards and thanks in advance

Re: Insert a zip file in my docx

PostPosted: Sat Mar 29, 2014 8:31 am
by jason
You can probably create a binary part containing your zip content, and attach that to the package.

Doing it that way though, it won't appear on the document surface. In other words, the user won't see it in Word, and therefore won't be able to click on it etc.

To have it appear on the document surface, you need to embed it as an OLE object.

You could write somewhat complex code to do that yourself using docx4j; otherwise that functionality is available out of the box in Plutext's commercial Enterprise Edition.