How is olColItems instantiated?
I'm not sure that Empty is going to work, as standard properties generally do have values. Try looking at ItemProperty.Type and then test for "", 0, and #1/1/4501#, depending on whether the property is text, numeric, or date/time. You should ignore any properties where Type = olOutlookInternal, olFormula, or olCombination.
--
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 message ...
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.
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.