S
Scott Sommerfeldt
Greetings
I have a function that was adapted from one of Sue Moshers modules in her
Book "Microsoft Outlook Programming"
which works except that it displays a security dialog when it accesses the
recipient.
I want to modify this code to use redemption but..... all my attempts have
failed.
I am using Outlook 2000 in an Exchange 2000 enviroment.
Function GetOtherUserTaskFolder(UsersEmail As String) As MAPIFolder
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim strName As String
Dim objDummy As Outlook.TaskItem
Dim objRecip As Outlook.Recipient
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = Nothing
strName = UsersEmail
If strName <> "" Then
Set objDummy = objApp.CreateItem(olTaskItem)
Set objRecip = objDummy.Recipients.Add(strName)
objRecip.Resolve
If objRecip.Resolved = True Then
On Error Resume Next
Set objFolder = _
objNS.GetSharedDefaultFolder(objRecip, _
olFolderTasks)
On Error GoTo 0
Else
MsgBox "Could not find "
End If
End If
Set GetOtherUserTaskFolder = objFolder
Set objApp = Nothing
Set objNS = Nothing
Set objFolder = Nothing
End Function
I have a function that was adapted from one of Sue Moshers modules in her
Book "Microsoft Outlook Programming"
which works except that it displays a security dialog when it accesses the
recipient.
I want to modify this code to use redemption but..... all my attempts have
failed.
I am using Outlook 2000 in an Exchange 2000 enviroment.
Function GetOtherUserTaskFolder(UsersEmail As String) As MAPIFolder
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim strName As String
Dim objDummy As Outlook.TaskItem
Dim objRecip As Outlook.Recipient
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = Nothing
strName = UsersEmail
If strName <> "" Then
Set objDummy = objApp.CreateItem(olTaskItem)
Set objRecip = objDummy.Recipients.Add(strName)
objRecip.Resolve
If objRecip.Resolved = True Then
On Error Resume Next
Set objFolder = _
objNS.GetSharedDefaultFolder(objRecip, _
olFolderTasks)
On Error GoTo 0
Else
MsgBox "Could not find "
End If
End If
Set GetOtherUserTaskFolder = objFolder
Set objApp = Nothing
Set objNS = Nothing
Set objFolder = Nothing
End Function