Gustav Brock
gustav at cactus.dk
Tue Apr 20 09:27:25 CDT 2004
Hi paul First, use Format() for creating strings from dates! Second, you probably need quotes around your file names as some of them contains spaces. Use Debug.Print: strQuote = Chr(34) strCommand = strQuote & "C:\Program Files\Winzip\Wzzip.exe" & strQuote & " " & strQuote & wzFinal & strQuote & " " & strQuote & strShiftData & strQuote & " " & strQuote & strDownTime & strQuote Debug.Print strCommand wzFiles = Shell(strCommand, 0) Remove line breaks above! /gustav > Thanks for all your help with my last WinZip question, however now I need to know where I am going wrong. I have the following code in my application: > Dim strShiftData As String > Dim strDownTime As String > Dim wzFinal As String > Dim wzFiles > strShiftData = "C:\Shifts_" & Replace(DATE, "/", "") & "_" & Replace(Time(), ":", "") & ".txt" > strDownTime = "C:\Down_" & Replace(DATE, "/", "") & "_" & Replace(Time(), ":", "") & ".txt" > DoCmd.TransferText acExportDelim, , "qryNewExportShiftDataToText", strShiftData, True > DoCmd.TransferText acExportDelim, , "qryNewExportDownTimeToText", strDownTime, True > wzFinal = "C:\Branston" & Replace(DATE, "/", "") & Replace(Time(), ":", "") > wzFiles = Shell("C:\Program Files\Winzip\Wzzip.exe " & wzFinal & " " & strShiftData & " " & strDownTime, 0) > MsgBox Finshed Export,,**** User Message Export Complete **** > However I cant seem to see any zip file on my C: drive, and I get no error message. Can someone please see where I am going wrong here. I have WinZip 9.0 and the Command Line Interface installed.