I'm trying to zip some items using Shell.
These are the two commands
1) pkzipc.exe -add C:\temp\test1.zip c:\temp\test.doc
2) pkzipc -add -passphrase=@c:\temp\secre
t.txt -cryptalgorithm=aes c:\temp\test_e.zip c:\temp\test.doc
So I've tried this code, that I saw elsewhere:
Dim strProgramName As String
Dim strArgument As String
strProgramName = "pkzipc.exe"
strArgument = "-add c:\temp\test1.zip c:\temp\test.doc"
Call Shell("""" & strProgramName & """ """ & strArgument & """", vbNormalFocus)
But it doesn't work. Not only that, but the command window closes too quickly, so I can't see why it failed.
So two questions:
a) What is the correct syntax for the Shell command to run both of the pkzip commands above
b) How do I keep the command window open so that I can see the results?