mark2004 Posted April 8, 2008 Share Posted April 8, 2008 I'm trying to include some code to interact with the Outlook 2003 Object and I'm running into a problem with a security dialog box. When you try to interact with the Body property in the Outlook object model, there is a dialog box that comes up asking if this is ok. I tried to get around this with using ControlClick to click the Yes button. The problem is that the autoit script is paused in the middle of the call to the object's property (the line with the ConsoleWrite command) and cannot proceed to the ControlClick command until the dialog box is closed (a catch 22). I'm at a loss. Please help!!! Here is my code: $objOutlook = ObjGet("","Outlook.Application") ; Get the Outlook app object If @error Then MsgBox(0,"","cannot get Outlook object") Endif $Ons=$objOutlook.GetNameSpace("MAPI") $Ofolder= $Ons.GetDefaultFolder(13) $Oitems=$Ofolder.Items ConsoleWrite($Oitems.Item(10).Body & @CRLF) WinWait("Microsoft Office Outlook") ControlClick("Microsoft Office Outlook","",4774) Exit Link to comment Share on other sites More sharing options...
rasim Posted April 8, 2008 Share Posted April 8, 2008 What showed a AutoIt Window Info utilite about this dialog box? Link to comment Share on other sites More sharing options...
Prim Posted April 8, 2008 Share Posted April 8, 2008 This add-on solves the problem, and it's free for personal use.http://www.mapilab.com/outlook/security/ Link to comment Share on other sites More sharing options...
mark2004 Posted April 12, 2008 Author Share Posted April 12, 2008 Thanks. I'm a little leery of introducing unknown software on my system (viruses etc). I'll investigate it a bit and see if thispackage is clean. If it is, this looks like exactly what I needed. Thanks again.This add-on solves the problem, and it's free for personal use.http://www.mapilab.com/outlook/security/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now