Try zipping he files using shell command
eg.
Sub ZipFile()
Dim ZipPath As String
Dim ZipIt As String
Dim Source As String
Dim Dest As String
ZipPath = "C:\Program files\Winzip\"
Source = "C:\Final.xls"
Dest = "C:\tt.zip"
'Note spaces important
ZipIt = Shell(ZipPath & "Winzip32 -a " & Dest & " " & Source, vbNormalFocus)
End Sub
Change as required....probably need to loop through.
Ivan
It looks positive (it opens winzip) but it doesn't work:
1. I receive the information MsgBox "Multiple files were dropped and one or more is an archive. Add files to Archives?"
(it is probably bcs the line is not compatible to WINZIP version 8)
2. then, WinZip asks if I want to add the files, if I click yes
3. then it says I am adding 2 files and it wants to add the archive: C:/Temp, etc (it knows the path but not everything the destination file name)
If I input the file name by myself, then it works, but it is as painful as before and the macro does not help.
the line I coded looks pretty much the same than yours:
Shell(sZipPath & "WINZIP32" & " " & sdestination & " " & SSource, vbnormalfocus)
I had to add " " between winzip32 and the destination.
Can anyone help me more?
Thanks
Pierre, the line needs to be exactly like Ivan typed it. You missed the -a after WINZIP32
Jerid It looks positive (it opens winzip) but it doesn't work:
THANK YOU GUYS, it happened that I forgot a space between Winzip32 and -a, then I unsuccessfully tried to modify the code.
Thank you again,
Pierre, the line needs to be exactly like Ivan typed it. You missed the -a after WINZIP32 Jerid : It looks positive (it opens winzip) but it doesn't work:
Jerid : It looks positive (it opens winzip) but it doesn't work: