7zip Command line Problem

geoffcodd

Registered User.
Local time
Today, 07:29
Joined
Aug 25, 2002
Messages
87
Hi,

Our company are moving from WinZip to 7zip, I had no issues with WinZip but I am struggling to get 7zip to work.

I am using the below vba in access, it creates the zip file but it is empty, any help in the right direction would be appreciated.

Thanks

Function Zip_Archive_File_7Zip()

Dim s7Zip, sZipFile, sFileToZip As String

sZipFile = "C:\TMA_Production_SQL\Outputs\TMA_Draft_Documents\xyz.zip"
sFileToZip = "C:\TMA_Production_SQL\Outputs\TMA_Draft_Documents\abc.doc"

s7Zip = "C:\Program Files\7-Zip\Command_Line\7za.exe" 'Location of the WinZip program

ShellWait s7Zip & " a -tzip """ & sZipFile & """ """ & sFileToZip & """, vbhide"

End Function
 
Try...

s7Zip = "C:\Program Files\7-Zip\Command_Line\7z.exe" 'or location of 7z.exe

Shell (s7Zip & " a -tzip " & sZipFile & " " & sFileToZip), vbhide
 
geoff, Did you ever manage to sort this upgrade from winzip code to 7zip?

Im struggling at the minute with the same task.
 

Users who are viewing this thread

Back
Top Bottom