Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to password protect a zipped folder using windows compression 2

Status
Not open for further replies.

knifey

Technical User
Nov 14, 2006
180
GB
Hi,
I have some VBA code that zips various folders using the windows built-in compression tool (not winzip) before attaching these zips to emails.
My problem is that I cannot find how to password protect the zipped folder using code.
I found this link on the net that shows my how to do it manually. This is exactly what I need, but how do I achieve this using VBA?:


Can anyone point me in the right direction?
Thanks,
Roy
P.S. This is actually a workaround as I cannot find a way to password protect .snp files for emailing. But if anyone knows a way this can be done that would be even better.
 
Two thoughts...

Research the Windows API for Zipping files and use it to program the compression.

Use a zip program that supports zipping with a password from the command line. Use this in conjunction with the shell function to execute it in Access. 7-zip is a popular free zip software that supports a command line. I would assume it supports passwords via command line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top