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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendkeys in Outlook

Status
Not open for further replies.

Carrion

Technical User
Jul 26, 2002
27
US
I am trying to Automate Outlook to export the calendar to an .xls file using the Sendkeys function. My problem occurs after this code

SendKeys "%ft{up 3}~{down 4}"

It will not proceed to the next menu. I have tried sending an enter command a command to press "n", and even tabbing over to the next button and then pressing all those. For some reason none of my efforts have allowed me to simply go on to the next screen.

If anyone has any ideas, please help

 
Why are you using sendkeys instead of using the builtin outlook methods? I suspect that if you snoop around these forums you will find that you can export the calendar without sending keys at all.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I have not had any luck finding anything on the subject. Do you know of a specific thread that I should look at.

thanks
 
If you must use SendKeys, let's talk about it.

"%ft{up 3}~{down 4}"

The above is too heavy to debug. Send one key at a time, separated by, let's say, one second durations. This will show you where the cursor is moving to, and most importantly which part is not working.

For example, instead of up 3, try a sequence of up 1.

And, remember to count menu breaks too.

 
And don't forget AppActivate.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top