Access Code Responding as if ‘NO’ to Outlook Allow Access Prompt

Joined
Jun 25, 2007
Messages
1
Reaction score
0
My application requires the user to go through the standard Outlook Allow Access security prompt and click yes. I am happy with this, as my users generally only use this function once / day; and it gives them confidence in the security features.



However, for one of my users, the application is responding as though he were clicking NO to the 'allow access' Outlook prompt, even when he clicks YES.



This user is using Outlook 2002 with MS Exchange Server.



At first I thought it was because his email was sitting on an MS Exchange Server Mailbox, and was not held locally. But we have since set his local Personal Folder as the Default Delivery Location, and restarted Outlook, and he is still experiencing this problem, even though his email is now locally held.



What is the issue? How can I resolve it?



The line of code the application is failing on is:

oMsg.SenderName = objEmailCollection.Sender



A portion of the code is copied below.



Dim oApp As Outlook.Application = New Outlook.Application

Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")

Dim oInbox As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)

Dim oItems As Outlook.Items = oInbox.Items

Dim oMsg As Outlook.MailItem



Dim intI As Integer

Dim intN As Integer

Dim intCount As Integer

Dim intErrorCount As Integer



Dim objEmails As New Emails



Try



intCount = 0

intN = 0

intI = 1



oNS.Logon("YourValidProfile", Missing.Value, False, True)



For intI = 1 To oItems.Count()

oMsg = oItems.Item(intI)

If oMsg.SenderName = objEmailCollection.Sender Then

intCount = intCount + 1

End If

Next



Catch ex As Exception

LogError(ex)

End Try



His setup includes MS Exchange Server and Outlook 2002.



My application is working successfully for many users on different setups including a MS Exchange Server and Outlook 2002 combination; but also Outlook 2000 / 2002 / 2003 with or without MS Exchange Server and on Windows 2000, XP or 2002 operating systems.



Any advice or pointers would be greatly appreciated.
 

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