|The stupid question is the question not asked|
need program to hang out awhile?by cypress (Beadle)
|on Dec 02, 2009 at 18:37 UTC||Need Help??|
cypress has asked for the
wisdom of the Perl Monks concerning the following question:
The following code prints fine for me.
When I ask to print an Excel file with the following code, I get a command line message indicating that a print request has been made; however, I get nothing out of the printer.
Without opening (running) the Excel application first, but rather merely selecting that test.xls file and then "Print" from Menu seems to require Excel to open first before the file can print. (In fact, on this Mac, a print dialog is opened, too, and I have to click a "Print" button -- as if my first request wasn't good enough. At least under Windows one request is adequate.)
If I drop another line into my code (below), hoping to open Excel and test.xls before printing it, the code exits without a command line indication that a print request has been made. (Presumably, my 'if' statement is returning false.) After exiting, the operating system finally gets around to opening Excel and my file, but -- too late! -- no print command is issued.
How do I get my program to hang out and twittle thumbs till Excel might be ready to accept a print call?