Zip Activeworkbook, Folder, File or Files with WinZip (VBA)
The basic examples on this page use VBA code to zip the ActiveWorkbook, Folder,
File or Files with:
WinZip
http://www.winzip.com/
Important: WinZip is not free and the code is only working if you have a registered(no trial) copy of WinZip.
See the Zip (compress) section on my site if you want to use a free program like 7-zip.
I really like 7-zip so check out my 7-zip pages if you are looking for a good free alternative.
Read this :
The code example on this page are using Shell to run winzip32.exe from the command line.
The undocumented parameters below were made available a long time ago, but have not been
supported since the release of WinZip 9.0 SR-1 in December of 2004. But they are still working OK.
Read the undocumented parameters information on this page
WinZip 12.1 does have an add-on (WinZip Command Line Support Add-on 3.1) available which would
allow you to perform many sophisticated actions from a command prompt, batch file, or other script.
I will also create a example page with code that use this add-in when I have time.
If you use version 12 you see that you have a option to use the extension .zip or .zipx (best compression)
So it is possible that you must change the extension in the code to .zipx
Code to Unzip with WinZip
For example code to unzip a zip file with WinZip visit :
http://www.rondebruin.nl/unzip.htm
Code for other Zip programs
For examples for 7-zip or the Default Windows Zip program see the Zip (compress) section on my site
http://www.rondebruin.nl/tips.htm
Examples
I have add all the code in a txt file on my site so it is easy to copy it in a module of your workbook.
Click on the link below
http://www.rondebruin.nl/files/codewinzipzippage.txt
1. Ctrl a to select all the code
2. Ctrl c to copy
3. Press the Back button in your browser to go back to this page
Open Excel or make Excel the active program
1. Alt-F11 to open the VBA Editor
2. Insert>Module from the Menu bar
3. Ctrl v to Paste the Code
4. Alt-q to go back to Excel
When you use the shortcut Alt F8 now you can see and run the macros.

Four examples above you can test without changing the code.
Only if you want to test the macro: B and D you must change something in the code
Important: Read the comments above and in the code good and after you test the code examples
you can try the commented examples in the first macro Zip_Folder_And_SubFolders_Browse
http://www.winzip.com/
Important: WinZip is not free and the code is only working if you have a registered(no trial) copy of WinZip.
See the Zip (compress) section on my site if you want to use a free program like 7-zip.
I really like 7-zip so check out my 7-zip pages if you are looking for a good free alternative.
Read this :
The code example on this page are using Shell to run winzip32.exe from the command line.
The undocumented parameters below were made available a long time ago, but have not been
supported since the release of WinZip 9.0 SR-1 in December of 2004. But they are still working OK.
Read the undocumented parameters information on this page
WinZip 12.1 does have an add-on (WinZip Command Line Support Add-on 3.1) available which would
allow you to perform many sophisticated actions from a command prompt, batch file, or other script.
I will also create a example page with code that use this add-in when I have time.
If you use version 12 you see that you have a option to use the extension .zip or .zipx (best compression)
So it is possible that you must change the extension in the code to .zipx
Code to Unzip with WinZip
For example code to unzip a zip file with WinZip visit :
http://www.rondebruin.nl/unzip.htm
Code for other Zip programs
For examples for 7-zip or the Default Windows Zip program see the Zip (compress) section on my site
http://www.rondebruin.nl/tips.htm
Examples
I have add all the code in a txt file on my site so it is easy to copy it in a module of your workbook.
Click on the link below
http://www.rondebruin.nl/files/codewinzipzippage.txt
1. Ctrl a to select all the code
2. Ctrl c to copy
3. Press the Back button in your browser to go back to this page
Open Excel or make Excel the active program
1. Alt-F11 to open the VBA Editor
2. Insert>Module from the Menu bar
3. Ctrl v to Paste the Code
4. Alt-q to go back to Excel
When you use the shortcut Alt F8 now you can see and run the macros.

Four examples above you can test without changing the code.
Only if you want to test the macro: B and D you must change something in the code
Important: Read the comments above and in the code good and after you test the code examples
you can try the commented examples in the first macro Zip_Folder_And_SubFolders_Browse