D despistado Nov 10, 2004 #1 How can I print an Excel file from DOS command line? I am working wit Excel 2000
D Dave Peterson Nov 10, 2004 #2 You could create a small .vbs (scripting file) and run that. The script opens excel, opens your file, prints the workbook, closes your file and closes excel. Copy this into notepad and save that file as: something.vbs Dim XL Dim XLWkbk Set XL = CreateObject("excel.application") XL.Visible = True Set XLWkbk = XL.Workbooks.Open("C:\my documents\excel\book11.xls") XLWkbk.PrintOut XLWkbk.Close False XL.Quit Set XLWkbk = Nothing Set XL = Nothing === Adjust the name/location of the file to print.
You could create a small .vbs (scripting file) and run that. The script opens excel, opens your file, prints the workbook, closes your file and closes excel. Copy this into notepad and save that file as: something.vbs Dim XL Dim XLWkbk Set XL = CreateObject("excel.application") XL.Visible = True Set XLWkbk = XL.Workbooks.Open("C:\my documents\excel\book11.xls") XLWkbk.PrintOut XLWkbk.Close False XL.Quit Set XLWkbk = Nothing Set XL = Nothing === Adjust the name/location of the file to print.