B
Ben Crinion
Hi,
I am trying to retrieve a comtacts mobile phone number from the
contacts folder.
The following VB6 code accesses the correct folder and retrieves
contacts but it doesnt display the phone number. When i "watch" the
row(1) variable it contains the following value "Error -2147221233".
If i use the same hex value to access a property in the Global Address
List it returns the number as expected.
I have used Outlook Spy to inspect the contacts and the mobile phone
numbers are present and im using the correct value for the property so
i dont know whats going on.
Anyone got any clues?
'table dims
Dim Columns(1)
Dim Row
Dim Filter 'As Redemption.TableFilter
Dim Restr 'As Redemption.RestrictionProperty
Dim Table 'As Redemption.MAPITable
'address dims
Dim session As session
Dim objAddressList 'As Redemption.AddressList
Dim objAddressEntries 'As Redemption.AddressEntries
Set Table = CreateObject("TBOLcom.MAPITable")
Table.Item =
Application.session.AddressLists.Item("Contacts").AddressEntries
'hex values for the properties i need
PR_DISPLAY_NAME = &H3001001E
PR_MOBILE_PHONE_NO = &H3A1C001E
Columns(0) = PR_DISPLAY_NAME
Columns(1) = PR_MOBILE_PHONE_NO
Table.Columns = Columns
Table.GoToFirst
Do
Row = Table.GetRow
If Not IsEmpty(Row) Then
On Error Resume Next
Debug.Print (Row(0) & vbTab & Row(1))
End If
Loop Until IsEmpty(Row)
End Function
Thanks,
Ben Crinion
I am trying to retrieve a comtacts mobile phone number from the
contacts folder.
The following VB6 code accesses the correct folder and retrieves
contacts but it doesnt display the phone number. When i "watch" the
row(1) variable it contains the following value "Error -2147221233".
If i use the same hex value to access a property in the Global Address
List it returns the number as expected.
I have used Outlook Spy to inspect the contacts and the mobile phone
numbers are present and im using the correct value for the property so
i dont know whats going on.
Anyone got any clues?
'table dims
Dim Columns(1)
Dim Row
Dim Filter 'As Redemption.TableFilter
Dim Restr 'As Redemption.RestrictionProperty
Dim Table 'As Redemption.MAPITable
'address dims
Dim session As session
Dim objAddressList 'As Redemption.AddressList
Dim objAddressEntries 'As Redemption.AddressEntries
Set Table = CreateObject("TBOLcom.MAPITable")
Table.Item =
Application.session.AddressLists.Item("Contacts").AddressEntries
'hex values for the properties i need
PR_DISPLAY_NAME = &H3001001E
PR_MOBILE_PHONE_NO = &H3A1C001E
Columns(0) = PR_DISPLAY_NAME
Columns(1) = PR_MOBILE_PHONE_NO
Table.Columns = Columns
Table.GoToFirst
Do
Row = Table.GetRow
If Not IsEmpty(Row) Then
On Error Resume Next
Debug.Print (Row(0) & vbTab & Row(1))
End If
Loop Until IsEmpty(Row)
End Function
Thanks,
Ben Crinion