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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...