Zip/Unzip via VBA

vtrm

Registered User.
Local time
Today, 08:26
Joined
Jun 8, 2005
Messages
21
Hi everyone,

I have XZIP.DLL which is registered in my machine. I use this to compress & extract files into a specific folder.
It's working fine. But I am not able to add a Password to the Zip file.
This is the code I am using presently:

Dim cp As XZip.Zip '** Archive files
Set cp = New XZip.Zip
cp.Pack "c:\temp\*.txt", "c:\temp\test.zip", False, , 9
Set cp = Nothing

ANY IDEAS???:rolleyes:
 
I don't use WinZip for compression, but wouldn't there be a parameter for that? As in:

cp.Pack "c:\temp\*.txt", "c:\temp\test.zip" /password=YourPasswordHere

I don't know if that's the correct format for WinZip, but I remember it having a command line interface like that where you could set the parameters. Check the WinZip command line stuff and I bet you find an answer.
 
I agree that Winzip has this argument. But I dont want to install it in all my remote machines which are operating at different far-off sites. That's why I chose this DLL.
In WinXP, if you select some files and right-click, you will see Send To - Compressed Folder. After the Compr.folder is created, dbl-click on it. Go to File menu - you will see 'Add a Password' option.
I am just trying to do this through my script. I am stuck.
ANY HELP?????
 

Users who are viewing this thread

Back
Top Bottom