Jump to content
Sign in to follow this  

Annoying Dialog Box from Outlook 2003 "object guard"

Recommended Posts


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")
$Ofolder= $Ons.GetDefaultFolder(13)
ConsoleWrite($Oitems.Item(10).Body & @CRLF)
WinWait("Microsoft Office Outlook")
ControlClick("Microsoft Office Outlook","",4774)

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.


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.