Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print an excel file from command line or "cron" type command ???
I need to print an excel file at 3:15 every day. I would like to be
able to "schedule" it like in a cron job...(windows of course...) I cant find any way to directly print from a comman line like "excel.exe "c:\myfile.xls" /p Any Ideas ???? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print an excel file from command line or "cron" type command ???
If you can make sure that the Excel spreadsheet in questions is opened a
little before 3:15, then you can can put use Application.OnTime. eg Private Sub Workbook_open() application.onTime Date + TimeSerial(15,15,0), "PrintRoutine" end sub in a module: Sub PrintRoutine() dim sh as Object for each sh in thisworkbook.Sheets ws.printout next sh End Sub Once the workbook is opened, it will do nothing until 3.15pm when it will run PrintRoutine. It is worth saying that if you open this after 3.15pm it will cause an error as the specified time is in the past. "Chris Salcedo" wrote in message oups.com... I need to print an excel file at 3:15 every day. I would like to be able to "schedule" it like in a cron job...(windows of course...) I cant find any way to directly print from a comman line like "excel.exe "c:\myfile.xls" /p Any Ideas ???? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print an excel file from command line or "cron" type command ???
This if from the VBA Help file using the OnTime method:
Application.OnTime TimeValue("17:00:00"), "my_Procedure" It starts the macro at 5 P.M. Maybe you could use this. "Chris Salcedo" wrote: I need to print an excel file at 3:15 every day. I would like to be able to "schedule" it like in a cron job...(windows of course...) I cant find any way to directly print from a comman line like "excel.exe "c:\myfile.xls" /p Any Ideas ???? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
["\r\n" new line command in CSV file] | Excel Discussion (Misc queries) | |||
Need command line to change "#DIV/0!" into a "0" (zero) | Excel Discussion (Misc queries) | |||
How to "Replace()" multiple characters in one VBA command line | Excel Discussion (Misc queries) | |||
Removing "Save As" Command from an excel file. | Excel Worksheet Functions | |||
Excel VBA File Search Command Cannot "See" VBA Project Name | Excel Programming |