Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sendkeys/general automation question
Hi guys,
I am trying to fully automate a task from excel and am experimenting with Sendkeys. Problem is when I open another application, excel loses focus (think that's correct) with the result that the sendkeys command doesn't get processed. Here's the code: Application.ActivePrinter = "PaperMaster Converter on Ne02:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= "PaperMaster Converter on Ne02:", Collate:=True SendKeys ("{ENTER}") Basically I am trying to achieve a broader automation than just excel (or microsoft product even), so does anyone know how I can go about it. Is there a kind of 'global' macro that will just record the keys a user presses regardless of application? ANy help much appreciated, kind regards, Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sendkeys/general automation question
Look at
http://msdn.microsoft.com/library/de...msendkeysx.asp for a good example of using SendKeys in a (relatively) bullet-proof fashion -- Gary's Student "Mark Stephens" wrote: Hi guys, I am trying to fully automate a task from excel and am experimenting with Sendkeys. Problem is when I open another application, excel loses focus (think that's correct) with the result that the sendkeys command doesn't get processed. Here's the code: Application.ActivePrinter = "PaperMaster Converter on Ne02:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= "PaperMaster Converter on Ne02:", Collate:=True SendKeys ("{ENTER}") Basically I am trying to achieve a broader automation than just excel (or microsoft product even), so does anyone know how I can go about it. Is there a kind of 'global' macro that will just record the keys a user presses regardless of application? ANy help much appreciated, kind regards, Mark |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sendkeys/general automation question
Thanks for that, Appreciate the pointer will take a look,
Regards, Mark "Gary's Student" wrote in message ... Look at http://msdn.microsoft.com/library/de...msendkeysx.asp for a good example of using SendKeys in a (relatively) bullet-proof fashion -- Gary's Student "Mark Stephens" wrote: Hi guys, I am trying to fully automate a task from excel and am experimenting with Sendkeys. Problem is when I open another application, excel loses focus (think that's correct) with the result that the sendkeys command doesn't get processed. Here's the code: Application.ActivePrinter = "PaperMaster Converter on Ne02:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= "PaperMaster Converter on Ne02:", Collate:=True SendKeys ("{ENTER}") Basically I am trying to achieve a broader automation than just excel (or microsoft product even), so does anyone know how I can go about it. Is there a kind of 'global' macro that will just record the keys a user presses regardless of application? ANy help much appreciated, kind regards, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
General Macro/Automation Question | Excel Discussion (Misc queries) | |||
General Question | Excel Discussion (Misc queries) | |||
General Question | Excel Worksheet Functions | |||
sendkeys method - question | Excel Programming | |||
SendKeys, Windows Active screen Question..Pls Help!!! | Excel Programming |