Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send keys for printing

Status
Not open for further replies.

zishan619

Programmer
May 28, 2003
284
0
0
MX
Hi I am trying to figure out if there is a way to press a button and print automatically to the setting I need.
The report that needs to print has to be setup in the page setup to legal size paper and then automatically print.
so far I have this:
function ZPrint()
window.factory.PageSetup
window.print
end function
But I was wondering if I can have the page setup automatically set to legal. Or can I use send keys to do this. Thanks
 
Does have your application a Macro Recorder ?

Hope This Help
PH.
 
Not that I know of if it does can you tell me where?
 
I don't recall interdev having a macro recorder. Your best bet at this point is to record all the needed key strokes to do the job manually, then script those keys with SendKeys. The main downfall of SendKeys is making sure your application has the focus. I like to do an AppActivate before each keystroke just to make sure nothing has snagged the focus away from me.

Tell us the keystrokes (don't use your mouse!) and I can help you with the context for the script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top