I created the following batch file using VB:
Open sBatchFile For Output As #1
Print #1, "@ECHO OFF"
Print #1, "ECHO Converting Excel Files to PDF, Please wait..."
Print #1, "batchpdf ""\\Tiltonsrv1\officeplantshared\Schedule_3.xls"" ""\\Tiltonsrv1\officeplantshared\SHIFT_SCHEDULES\"" &fileName& "
Close #1
i = Shell(sBatchFile, vbMaximizedFocus)
Application.Quit
End Sub
But the variable fileName isn't recognized. Am I putting it into the file correctly?