Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
General Macro/Automation Question Dave Excel Discussion (Misc queries) 1 June 28th 07 02:00 PM
General Question Jared Jenner Excel Discussion (Misc queries) 2 July 20th 06 05:56 PM
General Question Easydoesit Excel Worksheet Functions 1 June 19th 05 07:14 AM
sendkeys method - question TnT Excel Programming 1 July 21st 04 11:59 PM
SendKeys, Windows Active screen Question..Pls Help!!! Rumil Excel Programming 1 January 21st 04 12:56 AM


All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"