Sign in to follow this  
Followers 0
lonewolf217

How integrated can I get without Outlook ?

6 posts in this topic

Today is my first time trying to script using AutoIT and I am impressed. I have some questions however about how easily I can integrate it within Outlook.

I am trying to automate opening mails within Outlook for testing purposes but the only way I can figure out to do this would be to use mouse coordinates to select the area where a message will be then use mouseclick action to open it.

Is there any further integration within Outlook where I can select message properties, or subjects or anything else which may help me make this a little more user friendly? I have checked with the AutoIT WindowInfo tool and unfortunetly it looks like there are no controls given for individual messages.

Any help is appreciated, Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Are you familiar with Obj/COM? You can interface with Outlook as an object.

Here's a quick example on how to count unread emails.

$objOutlook = ObjCreate("Outlook.Application")

$objNameSpace = $objOutlook.GetNamespace("MAPI")
$objNamespace.Logon("Default Outlook Profile", "", FALSE, TRUE)  
$objFolder = $objNamespace.GetDefaultFolder(6)
Msgbox(0,"Unread Email Count",$objFolder.UnreadItemCount)

http://msdn2.microsoft.com/en-us/library/a...office.11).aspx

Also search google for outlook vba scripts. VBA can be converted fairly easily to AutoIt.

Edited by spudw2k

Share this post


Link to post
Share on other sites

For outlook express

1. http://www.freevbcode.com/ShowCode.asp?ID=5213 you should translate the VB code to AutoIt Code

2. http://www.codeproject.com/KB/COM/EfOelibrary.aspx

For full outlook automation search in google for outlook automation object model

1. set $oOutlookApplication = objCreate("outlook.application")

Share this post


Link to post
Share on other sites

cool!

ive done a little with vbscripting as well so I will investigate further on this.

thanks for the quick info

Share this post


Link to post
Share on other sites

Hope you don't mind but I am also looking for a script to check for outstanding e-mails. I am very new to AutoIt and have very little exposure to modern programming. The last program I wrote was in a DOS based scripting language some 15 years ago. Anyway, If you are successful would you be so kind as to post the successful part of the script that will check and display the number of unread e-mails the user logging on has, I would be very grateful.

Many thanks

Alan

Share this post


Link to post
Share on other sites

...display the number of unread e-mails the user logging on has...

See the second post. Need more of an example then that?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0