Create user defined fields for contact using MAPI

  • Thread starter Thread starter Isaac Varghese
  • Start date Start date
I

Isaac Varghese

I'm trying to add a custom property(user defined fields) to a contact
item in Outlook in C# using MAPI.

And i'm successful in that also.Also i'm able to read that property
afterwards.

I use the following code to set create the properties.
######################################################
MAPI.Field fld = (MAPI.Field)flds.Add("CONTACT_ID",MAPI.CdoFieldType.CdoString,"","0420060000000000C000000000000046");

fld.Value ="111111";

#########################################

But my problem is when i open the contact card and check the ALL
fields tab i can't see this property.
Where can i see the properties set using MAPI??I'm i doing anything
fundamentally wrong.

Any help in this direction is appreciated.

Thanks in Advance
Isaac Varghese
 
You've added a custom field to the item in the message store, but the standard Outlook contact form doesn't know anything about that field. If you want the form to display the value you will need to edit the form definition. If you just want a visual indicator for your custom field you can add that field to folder and then create or modify a table style view to include that field. Or you can use OutlookSpy (http://www.dimastr.com/outspy/) to see all the fields on the item
 
Easiest thing is to go into Outlook for your folder, open the Field Chooser
and add a new field with the same name as your custom field (CONTACT_ID).
Drag and drop the field into your view and you should see your values.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp

This posting is provided "AS IS" with no warranties, and confers no rights.



Dave Kane said:
You've added a custom field to the item in the message store, but the
standard Outlook contact form doesn't know anything about that field. If you
want the form to display the value you will need to edit the form
definition. If you just want a visual indicator for your custom field you
can add that field to folder and then create or modify a table style view to
include that field. Or you can use OutlookSpy
(http://www.dimastr.com/outspy/) to see all the fields on the item
 
Back
Top