J
John Galt
Has anyone used extended MAPI to automate Outlook?
I had code that worked thru CDO but wanted to avoid the Outlook security
Patch that kept popping up a dialog box.
When I changed my code using the redemption library IU ran into problems
traversing the Folder structure.
Before the change the code below worked fine. The Id of the folder I want
is in Getfolder...
When I made the Redemption chnage that statement Gives me a Run-time
error -2147024809(80070057) [Collaboration Data
Objects -[E_INVALIDARG(80070057)]].
The code I have is:
Private Function LoadContacts()
Dim varInvCnt As Long
Dim InvSelect As Long
Dim InvSelected As String
Dim objSession As MAPI.Session
Dim objFolder As Redemption.MAPIFolder
Dim objmessages As MAPI.Messages
Dim Objfields As MAPI.Fields
Dim objmessage As MAPI.Message
Set objSession = CreateObject("MAPI.Session")
If Not objSession Is Nothing Then
strProfileName = "MS Exchange Settings"
objSession.Logon strProfileName, "", False
End If
'*** GetFolder("My Local E-Mail\Morang Cove Trading Company\MCTC
Contacts")
Set objFolder =
objSession.GetFolder("{00000000515BA5871FC8D5119923000475762650C2960000}")
I had code that worked thru CDO but wanted to avoid the Outlook security
Patch that kept popping up a dialog box.
When I changed my code using the redemption library IU ran into problems
traversing the Folder structure.
Before the change the code below worked fine. The Id of the folder I want
is in Getfolder...
When I made the Redemption chnage that statement Gives me a Run-time
error -2147024809(80070057) [Collaboration Data
Objects -[E_INVALIDARG(80070057)]].
The code I have is:
Private Function LoadContacts()
Dim varInvCnt As Long
Dim InvSelect As Long
Dim InvSelected As String
Dim objSession As MAPI.Session
Dim objFolder As Redemption.MAPIFolder
Dim objmessages As MAPI.Messages
Dim Objfields As MAPI.Fields
Dim objmessage As MAPI.Message
Set objSession = CreateObject("MAPI.Session")
If Not objSession Is Nothing Then
strProfileName = "MS Exchange Settings"
objSession.Logon strProfileName, "", False
End If
'*** GetFolder("My Local E-Mail\Morang Cove Trading Company\MCTC
Contacts")
Set objFolder =
objSession.GetFolder("{00000000515BA5871FC8D5119923000475762650C2960000}")