MattSmithProg
Programmer
Hi,
I have had this problem for a while now. I am attempting to get the properties of an individual via the Global address book.
What I have so far is this:
Sub AddName(txtNameBox As Object, strTitle As String)
Dim objSession As MAPI.Session
Dim objRecips As MAPI.Recipients
Set objSession = CreateObject("MAPI.Session"
objSession.Logon "default outlook profile"
Set objRecips = objSession.AddressBook(, "Select " & strTitle, , , 1, _
"Add " & strTitle, , , 0)
If Err.Number <> 0 Then
'No Users selected
Err.Clear
End If
txtNameBox.Value = objRecips(1)
objSession.Logoff
Set objRecips = Nothing
Set objSession = Nothing
End Sub
What I am attempting to do is from the person that the user selects get the cdoPR_ACCOUNT name.
Does anyone have any ideas how I could do this. I have tried creating an email message and entering the person's name and then the Fields.Item(&H3A00001E) property is available but then I run in to the problem of ambiguous names.
Any ideas???
Matt Smith
No two nulls are the same
I have had this problem for a while now. I am attempting to get the properties of an individual via the Global address book.
What I have so far is this:
Sub AddName(txtNameBox As Object, strTitle As String)
Dim objSession As MAPI.Session
Dim objRecips As MAPI.Recipients
Set objSession = CreateObject("MAPI.Session"
objSession.Logon "default outlook profile"
Set objRecips = objSession.AddressBook(, "Select " & strTitle, , , 1, _
"Add " & strTitle, , , 0)
If Err.Number <> 0 Then
'No Users selected
Err.Clear
End If
txtNameBox.Value = objRecips(1)
objSession.Logoff
Set objRecips = Nothing
Set objSession = Nothing
End Sub
What I am attempting to do is from the person that the user selects get the cdoPR_ACCOUNT name.
Does anyone have any ideas how I could do this. I have tried creating an email message and entering the person's name and then the Fields.Item(&H3A00001E) property is available but then I run in to the problem of ambiguous names.
Any ideas???
Matt Smith
No two nulls are the same