Exporting Custom Contact Fields through VBA code

  • Thread starter Thread starter Chris W
  • Start date Start date
C

Chris W

I have some code that will take custom fields from a
contact item and export that information into Excel.
However, if the custom field exists at the Form level,
then I cannot use the Item.UserProperties arguement to
find that field (OCCUPANTID for example). This is my code
so far:

If item.UserProperties("OCCUPANTID") <> "" Then
range.Value = item.UserProperties("OCCUPANTID")
End If

Does anyone know of a way to use the UserProperties to get
to a Form level field?

Thanks,
Chris
 
If you're getting an error, that would indicate that the property is *not*
in fact defined at the form level and would need to be added before a value
for it could be set (which means there's no value to export for that item).
 
Back
Top