Hi
I'm trying to unzip files using VBA from within outlook, but can't get it to work.
This is the code I'm trying
Sub UnZipaFile()
UnZipFile ZipedFileName:="c:\123r5w\work\accounts\qhop0903.zip", _
TargetDirectory:="c:\accounts\", _
UnZipOptions:="-o -d"
End Sub
Function UnZipFile(ZipedFileName As String, _
Optional TargetDirectory As String, _
Optional UnZipOptions As String)
Dim Wzunzip
Dim UnZipCommandLine
Dim TaskID
Wzunzip = "C:\Program Files\WinZip\Wzunzip.exe"
UnZipCommandLine = Wzunzip & " " & UnZipOptions & " " & ZipedFileName _
& " " & TargetDirectory
TaskID = Shell(UnZipCommandLine, vbHide)
End Function
I don't get any error messages it doesn't work. Has anybody got a clue of indeed a better way of doing it
Thanks
I'm trying to unzip files using VBA from within outlook, but can't get it to work.
This is the code I'm trying
Sub UnZipaFile()
UnZipFile ZipedFileName:="c:\123r5w\work\accounts\qhop0903.zip", _
TargetDirectory:="c:\accounts\", _
UnZipOptions:="-o -d"
End Sub
Function UnZipFile(ZipedFileName As String, _
Optional TargetDirectory As String, _
Optional UnZipOptions As String)
Dim Wzunzip
Dim UnZipCommandLine
Dim TaskID
Wzunzip = "C:\Program Files\WinZip\Wzunzip.exe"
UnZipCommandLine = Wzunzip & " " & UnZipOptions & " " & ZipedFileName _
& " " & TargetDirectory
TaskID = Shell(UnZipCommandLine, vbHide)
End Function
I don't get any error messages it doesn't work. Has anybody got a clue of indeed a better way of doing it
Thanks