The time now is 07/24/08 - 09:40
Log in: Username: Password:
Search forums for:
  
 
H-Desk.com Forum Index

H-Desk.com - PC Security matters - Protect your PC privacy


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


H-Desk.com Forum Index -> Microsoft Office

Post new topic   Reply to topic
Author Message
LucyFraser



Joined: 25 Jun 2007
Posts: 1



PostPosted: 06/25/07 - 19:40    Post subject: Code Responding as if ‘NO’ to Outlook Allow Access Prompt Reply with quote

I have written an application that reads emails from MS Outlook. The 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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic All times are GMT

H-Desk.com Forum Index -> Microsoft Office

Page 1 of 1

Related topics:
Internet Explorer Not Responding on WinXP
Internet Explorer is not responding
Internet Options not responding on my Windows 2000 Home
Firefox often Not responding
Game stops responding
Outlook Express 6
Outlook Express 6
Microsoft Office Outlook - Email all gone in inbox
Cannot open Outlook 2000
Can't Delete in Outlook
Access 97 - Record locking
Access 97 - Scheduler & database
Excel 2002 filename cannot be accessed
How secure is MS Access?
Linking Tables through ODBC in MS Access
Outlook keeps prompting for password