I'm trying to create a batch file that will convert an Excel file to a PDF. Is there something wrong with my command line because it doesn't seem to work:
Dim i As Double
Dim sBatchFile As String
ActiveWorkbook.Save
sBatchFile = "C:\test.bat"
Open sBatchFile For Output As #1
Print #1, "@ECHO OFF"
Print #1, "ECHO Converting Excel Files to PDF, Please wait..."
Print #1, "batchpdf C:\Documents and Settings\Andrew_G\My Documents\Office Docs\Schedule.xls C:\Documents and Settings\Andrew_G\My Documents\Office Docs\TEST1234.pdf"
Close #1
i = Shell(sBatchFile, vbMaximizedFocus)
End Sub