Changing MessageClass of a ContactItem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
On drag n dropping a contact to a folder, i need to display it in a
customform . For that , in the Item_Add of that destination folder im
changing the Items message class to my custom form
olMyItem.MessageClass = "IPM.Contact.CustomForm1"

Then i need to display the contact to the user , For that i used the
following code

olMyItem.Display(false)

But the contact is getting displayed in the default contact form.

what should i do to get it displayed in the Customform which is published in
the Personal forms library. im working with Outlook 2000.


Thanks in Advance....
NC
 
Yeah, after changing the message class im saving the item.

Eventhough im changing the MessageClass of the Item, the
olMyItem.FormDescription.MessageClass remains the default class.

And as this .FormDescription.MessageClass is a readonly property i canont
change it thru code.

But once after saving, if im dragging and dropping the same contact item to
another contact folder the Contact Item will get displayed in the CustomForm,
which i have assigned earlier and here the .FormDescription.MessageClass is
changed to the custom class.

Did n't get any idea with regard to this unusual behaviour.

Thanks for u help

Regards
NC
 
Show the code you're using to change the item. You might be just running into some of Outlook's caching. Releasing all objects is critical.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top