Hello,

as many of you already knows I'm creating an extension for Excel. The new Userform control called Virtual Forms. It is created in vb6.

With help of the big names in the vb6 world (I will not mention by name, to not miss someone) the control will work in 32-bit and 64-bit Office.

My new challenge is:
The control needs one file where it stores it's data, for now this file is in the same folder where the workbook is (with extension *.vf)
It gives me headaches, the workbook first needs to be save to get the folder, when redistibuting the workbook they also need to not forget this .vf file,.......

Now I would like to embed this file in the workbook file.
From 2007+ the office is using new file formats (*.xlsx, *.xlsm, *.docx,.....)
They are in fact a zip files that contains xml files.

They are called Office Open XML.

What I would like is to embed the file where my control stores it's data into this zip files (if the standards are requesting I would also need to convert them to xml files) (for vb6 uses of this control I will leave the external .vf file)

But what is bothering me is how to read and write to this file if it is embeded into this zip file (*.xlsx). Do I really need to extract and compress every time I need it.
I think that in .net they are accessing it with memorystreams. But I'm not 100% sure.

Does anyone have any idea?

(you can try to rename your Book1.xlsx to Book1.zip and you can open it and see the content)

Davor