May 2, 2002 #1 Henaniy Programmer May 2, 2002 12 US Does anyone know what the vba shell command is to unzip a file? Any other alternatives would also be appreciated.
Does anyone know what the vba shell command is to unzip a file? Any other alternatives would also be appreciated.
May 3, 2002 #2 mashelford Programmer Apr 5, 2002 6 GB Hi Hope it is of use coding to do both zip and unzip Function ZIP() 'TO ZIP A FILE Dim FileToSave As String, ZipFileName As String FileToSave = "C:\YOUR_FILE_TO_ZIP.TXT" ZipFileName = "C:\YOUR_ZIP_FILE" Call Shell("c:\Program Files\winzip\Winzip32.exe -A " _ & ZipFileName & " " & FileToSave, 1) End Function Then to Unzip Function unZIP() 'TO UNZIP A FILE Dim FileToUnzip As String, ZipOutputTo As String FileToUnzip = "C:\YOUR_ZIP_FILE.ZIP" ZipOutputTo = "C:\" Call Shell("c:\Program Files\winzip\Winzip32.exe -e " _ & FileToUnzip & " " & ZipOutputTo, 1) End Function regards Martin Upvote 0 Downvote
Hi Hope it is of use coding to do both zip and unzip Function ZIP() 'TO ZIP A FILE Dim FileToSave As String, ZipFileName As String FileToSave = "C:\YOUR_FILE_TO_ZIP.TXT" ZipFileName = "C:\YOUR_ZIP_FILE" Call Shell("c:\Program Files\winzip\Winzip32.exe -A " _ & ZipFileName & " " & FileToSave, 1) End Function Then to Unzip Function unZIP() 'TO UNZIP A FILE Dim FileToUnzip As String, ZipOutputTo As String FileToUnzip = "C:\YOUR_ZIP_FILE.ZIP" ZipOutputTo = "C:\" Call Shell("c:\Program Files\winzip\Winzip32.exe -e " _ & FileToUnzip & " " & ZipOutputTo, 1) End Function regards Martin