E
Ed
I have a program in Access that checks the status of Outlook tasks. The
program works fine, but every time it runs the user get a dialog box saying
"A program is trying to access email address you have stored in Outlook. Do
you want to allow this?" This is very annoying to the user. How can I get
rid of this?
This is a piece of the code:
Dim myOlApp As New Outlook.Application
Dim olns As NameSpace
Dim TasksFolders As MAPIFolder
Dim taskItems As TaskItem
Dim Itm As TaskItem
Dim sMyName As String
Dim sTaskID As String
Set olns = myOlApp.GetNamespace("MAPI")
Set TasksFolders = olns.GetDefaultFolder(olFolderTasks)
For Each Itm In TasksFolders.Items
If Itm.Subject = sTaskID _
And Itm.Owner = sMyName Then
'Do something
end if
Next
program works fine, but every time it runs the user get a dialog box saying
"A program is trying to access email address you have stored in Outlook. Do
you want to allow this?" This is very annoying to the user. How can I get
rid of this?
This is a piece of the code:
Dim myOlApp As New Outlook.Application
Dim olns As NameSpace
Dim TasksFolders As MAPIFolder
Dim taskItems As TaskItem
Dim Itm As TaskItem
Dim sMyName As String
Dim sTaskID As String
Set olns = myOlApp.GetNamespace("MAPI")
Set TasksFolders = olns.GetDefaultFolder(olFolderTasks)
For Each Itm In TasksFolders.Items
If Itm.Subject = sTaskID _
And Itm.Owner = sMyName Then
'Do something
end if
Next