View Single Post
  #3  
Old December 18th 07, 05:48 PM posted to microsoft.public.outlook.program_vba
Chris S[_2_]
external usenet poster
 
Posts: 6
Default How to compare 2 contacts with VBA?

On Dec 18, 3:52 pm, "Sue Mosher [MVP-Outlook]"
wrote:
You can use the ItemProperties collection to iterate all the standard fields except for collection like Links.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Chris S" wrote in ...
Hi,


I have written a macro that lists all duplicates in an outlook
contacts folder. Now that I know which contacts are duplicated, I am
trying to find out WHAT differences, if any, there are between the
duplicates.


So, does anyone know how to find/list all the non empty fields in any
given contact using vba?


Thanks.


Thanks Sue. I am currently trying that route, but so far not
successfully! this is what I have:


For Each ItemProperty In olColItems(i).ItemProperties
If ItemProperty Is Empty Then propCount = propCount + 1
Next

But I get an object required error on the If statement... I am not
sure i am using it properly, do you have any ideas what I am doing
wrong? i am trying to get proCount to be populated with the number of
fields that are NOT empty in any given contact.



Ads