Outlook email security problems

R

Reetu

Hi All,

I am using Outlook 2002 talking to Exchange server.

I am getting the following error:

"A program is trying to access e-mail address you have
stored in outlook. Do you want to allow this? If this
is unexpected it may be a virus and you should choose No."

The code(VbScript) is as follows:

Dim oSession, oNamespace, oApp
Dim userProfile
Dim const_cdoPR_Account
const_cdoPR_Account = &h3a00001e

Set oApp = CreateObject("Outlook.Application")
Set oNamespace = oApp.GetNamespace("MAPI")
Set oSession = oApp.CreateObject("MAPI.Session") // The
error is displayed when this stmt is encountered

oSession.MAPIOBJECT = Application.Session.MAPIOBJECT

I know the problem is because of some settings that are
required to be done. I visited few sites which mentions to
make some registry changes. But I am still not able to get
rid of that error.

Thanks in adavnce.

Regards,
-Reetu
 
K

Ken Slovak - [MVP - Outlook]

CDO 1.21 is more secure than the Outlook object model, unless you are
using a server side script and using the server version of CDO 1.21.

If this code isn't running in the Outlook VBA project or in an Outlook
form then Application isn't a valid object. Also, using VBScript or
VBA/VB the MAPIOBJECT isn't usable. Why do you need this statement at
all? Why not just use a piggy-back login to CDO: oSession.Logon "",
"", False, False?

I'd look into Redemption (www.dimastr.com/redemption) as a way around
the security prompts. You're going to get them if you try to access
email addresses, recipients, contacts and so on using CDO code unless
the code is running in Outlook 2003 in a published form that isn't
one-offed or in the Outlook VBA project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top