CDO Outlook security prompt hangs, vb script Mapi Session

K

ken_wilsonii

User is on

Windows XP Pro SP2
Office 2003 XP SP2

Using an Outlook 2003 custom form

set Session1 = CreateObject("MAPI.Session")
msgbox "Before Logon"
on error resume next
Session1.Logon "","",False,False
msgbox "After Logon"

msgbox Session1.CurrentUser.Fields(CdoPR_TITLE).Value

msgbox "After Security Prompt"


User get's the message box "After Logon"
The next line trying to display the users Title hangs Outlook and the
security prompt never appears.

This works fine for me on my own computer and works fine for me if I
am logged on to the same computer the users is on.

CDO file versions are slightly different
6.5.7232.92 on the users computer
6.5.7233.48 on mine.


Can't figure this one out, the settings on the Outlook account are
identical to mine.
 
K

Ken Slovak - [MVP - Outlook]

I wouldn't worry about the versions since you don't have a problem when
using your own logon on that computer. When you use your own logon I'm
assuming you mean a different Windows logon? Perhaps your organization is
using the Exchange security form to limit the uses of CDO methods and
properties to certain groups in the AD? That might explain it.

Normally you would receive an Outlook security warning when the code
accessed Session.CurrentUser, since that's restricted by client-side CDO. If
you didn't get that warning when you ran the code then either your logon is
permitted to use that in code based on the security form, or the code was
run under server-side CDO, which is not security restricted.
 
A

AVIS

Instead of the below statement
Session1.Logon "","",False,False
Replace with
Session1.Logon "","",True,False
Then try to update the local machine mail profile of the user, who is having
the problem, with his/her details.

This is a solution, since I am having the same problem and found this fix.
But I cannot apply this fix to my application, I am planning to start a
seperate thread for my issue.
 

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