Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel.printing
|
|||
|
|||
command line script for printing MS Excel 2000 document.
I am looking for a way to schedule an Excel Document to automatically
print using the scheduled Tasks of Windows XP. I can't for the life of me figure out if a command line switch exists for doing such a thing, and was wondering if anyone has been able to do this. Thanks for your thoughts. Michael Stavropoulos |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
command line script for printing MS Excel 2000 document.
Hi
There is one way - go to ThisWorkBook in VBE and paste the following code Private Sub Workbook_Open() Range("$A$1:$M$30").PrintOut Copies:=1, Collate:=True Application.DisplayAlerts = False Application.Quit End Sub Change the range to suit your print area and then schedule a task to open that Excel file. So when it opens it will print it then close it (without saving). This is untested code as I do not have printer at the moment. If you want open the workbook without printing the code hold down Shift before opening. Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
Limited Page Printing problem; Blue Dashed Line Delineating End Of Document ? | New Users to Excel | |||
command line Excel Script | Excel Discussion (Misc queries) | |||
Disabling Document AutoRecovery in Excel by script | Excel Discussion (Misc queries) | |||
Using Excel 2000 as Data source for Word 2000 document | Excel Discussion (Misc queries) |