How to disable microsoft office outlook message

how to disable microsoft office outlook message?

i have tried like this

'Set objOLSecurityManager=objOLApp.GetNamespace("Outlook.SecurityManager")

Set objOLSecurityManager=CreateObject(“Outlook.SecurityManager”)

objOLSecurityManager.DisableOOMWarnings = True

but i am getting can not create automation object

can anyone help on this?

thanks in advance.

Subject: how to disable microsoft office outlook message

what microsoft outlook message?

Subject: RE: how to disable microsoft office outlook message

I am getting this message

—"Microsoft office outlook message.

A program is trying to access e-mail addresses you have stored in outlook do you want to allow this?

if this is unexpected, it may be virus and you should choose “No”—

I am getting this message after invoking the outlook object. Please help me in removing this message and getting the thing through code.

Subject: RE: how to disable microsoft office outlook message

OK, and how are you invoking the outlook object?

Subject: RE: how to disable microsoft office outlook message

I am doing like this:Set objOLApp = CreateObject( “Outlook.Application.11”)

'Set objOLSecurityManager=objOLApp.GetNamespace(“Outlook.SecurityManager”)

'Set objOLSecurityManager=CreateObject(“Outlook.SecurityManager”)

Set objMAPI = objOLApp.GetNamespace("MAPI")	

Set objOLFolder = objMAPI.GetDefaultFolder(olFolderInbox)

Forall objOLMail In objOLFolder.Items

    MsgBody = objOLMail.Body 'I am getting that message alert in this line

		MsgLines = Split(MsgBody,Chr(10))

end forall

thanks alot

Subject: how to disable microsoft office outlook message

Hi… I am getting the same security warning message… I tried to create Outlook.SecurityManager it says cannot create object msg as said by you.

Have you got solution for this, if so please share it. Thanks in Advance!