I am currently updating a database to allow exported Excel files to be automatically zipped using Winzip and the shell command. I have run various tests using the below lines:
Call Shell("c:\Program Files\WinZip\Winzip32.exe -A " & """" & sZipName & """" & " " & """" & sFileName & """")
Kill sFileName
This seems to work absolutely fine, zipping each file after it has been created, and then deleting the original file. However I have ran the process out of office hours using the form timer to set it off and this morning I have found that Winzip errored on the first file with the following error:
No files were found for this action that match your criteria - nothing to do (T:\Customer MI\Trending Reports\Customer\00000982 Trending 150404.zip)
Does anyone know why this error has occured? Is it because it is trying to zip the file before it has finished saving it to the drive? If I include the DoEvents command will that fix it?
Call Shell("c:\Program Files\WinZip\Winzip32.exe -A " & """" & sZipName & """" & " " & """" & sFileName & """")
Kill sFileName
This seems to work absolutely fine, zipping each file after it has been created, and then deleting the original file. However I have ran the process out of office hours using the form timer to set it off and this morning I have found that Winzip errored on the first file with the following error:
No files were found for this action that match your criteria - nothing to do (T:\Customer MI\Trending Reports\Customer\00000982 Trending 150404.zip)
Does anyone know why this error has occured? Is it because it is trying to zip the file before it has finished saving it to the drive? If I include the DoEvents command will that fix it?