Sign in to follow this  
Followers 0
mark2004

Annoying Dialog Box from Outlook 2003 "object guard"

4 posts in this topic

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

Share this post


Link to post
Share on other sites



What showed a AutoIt Window Info utilite about this dialog box?

Share this post


Link to post
Share on other sites

Thanks. I'm a little leery of introducing unknown software on my system (viruses etc). I'll investigate it a bit and see if this

package 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/

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