
February 7th, 2004, 06:55 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
outlook VBA
hi,
iam not able to use the find method of contacts folder collection effectively. when im trying to find a name in the contacts folder it returns an appropriate contact item if found.
but if i try to find by the mobile no of the same contact it does not return me anything is there any special way to do it??? the code example is pasted below.
Code:
contacts folder collection
Set conFol = objNS.GetDefaultFolder(olFolderContacts)
recipients collection
Set oRecips = objMailItem.Recipients
recipient object
Set oRecip = oRecips.Item(1)
contact item
Set conItem = conFol.Items.Find("[FullName]=" & oRecip.Name)
If conItem Is Nothing Then
Set conItem =
conFol.Items.Find("[MobileTelephoneNumber]=" & Trim
(oRecip.Name))
End If
Last edited by stumpy : February 7th, 2004 at 08:42 AM.
Reason: Please place code in the CODE tags. Also, do NOT double post. Read the rules if you are unsure.
|