# Copy Files to A Compressed Folder



## jexline (Dec 15, 2009)

I am trying to put several files into a zipped file (Windows Vista uses compressed folders) inside of my VB coding.

I have tried making a folder with a ".zip" extension and copying files into it.  The result was not a compressed folder.  I have looked for a way to address with file attributes, but cannot find any references.

Can anyone help?


----------



## NdNoviceHlp (Dec 16, 2009)

HTH. Dave 
http://www.vbaexpress.com/forum/showthread.php?t=17357&highlight=namespace


----------



## NdNoviceHlp (Dec 16, 2009)

The code in the link can be used to compress/unzip the whole folder. Dave


----------



## jexline (Dec 16, 2009)

True, but I am "zipping" a set of financial statements to be emailed out to users.  In order for this code to work, then end users would have to have an object to run the "unzip" function.

That is why I was trying to use Window's compressed folder functionality.

However, I have run into a second stumbling block, evidently the Outlook runtime library does not allow me to attach a folder (even a zipped one) to an email, only a file.

So for now, I just have my code looping through and attaching the filed one by one.

(not very efficient)


----------

