Drag & Drop

I

IndraKumar

I am using Outlook 2000.

I have created one public folder called "Central Company Contact".

I have created a contact form "CCContact" and published in "Central
Company Contact" folder.

Whenever user drops the contact from the default contact folder to
"Central Company Contact" folder, I like to convert to default contact to
"CCContact" then added to "Central Company Contact". How to do it ?
 
S

Sue Mosher [MVP-Outlook]

You would need either an Exchange event sink to perform the conversion at
the server level or a COM add-in running on every machine to perform the
conversion at the client level.
 
I

IndraKumar

I have created add-in for the outlook.

How to convert default contact item to "CCContact" item. I am trying to do
in ItemAdded event for the Items collection.
 
S

Sue Mosher [MVP-Outlook]

In the ItemAdd event handler, simply change the MessageClass property and
save the item.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I

IndraKumar

Thanks. It is working. But one issue. After chaning the MessageClass, I am
trying to display the contact, but it is showing the default contact form.
When i reopen the contact again , it is showing the "CCContact" form.
 
S

Sue Mosher [MVP-Outlook]

Your code needs to dereference the item after you change the MessageClass.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I

IndraKumar

thanks for the answer. but I am still getting the same result. There is the
piece of code that changes the MessageClass:


if ( ! Item.MessageClass.Equals("IPM.Contact.CCContact") )
{
string entryID = item.EntryID;
Item.MessageClass = "IPM.Contact.CCContact";
Item.Save();
Item.Close(MSOutlook.OlInspectorClose.olSave);


Item = null;
Item =
(MSOutlook._ContactItem)m_outlookApp.GetNamespace("MAPI").GetItemFromID(entryID, System.Type.Missing);
Item.Display(false);
}
 
Top