Asked by:
Outlook Appointment MessageClass not updating

Question
-
Hi,
I am trying to update AppointmentItem to use the custom form. I am updating the MessageClass property. But once the appointment items is saved, message class is reverting to IPM.Appointment.Scheduler. Not sure how to change the messageclass for an appointment item. Any help is much appreciated.
Here is the code snippet that I have used.
Outlook.MAPIFolder folder = Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
Outlook.Items items = folder.Items;
Outlook.Items eventItems = eventItems = items.Restrict(string.Format("[{0}] = '{1}'", "ItemId", 1));
Outlook.AppointmentItem matchingEvent = (eventItems[1] as Outlook.AppointmentItem);
matchingEvent.MessageClass = MESSAGECLASS;
matchingEvent.Save();
if (matchingEvent != null && Marshal.IsComObject(matchingEvent))
Marshal.ReleaseComObject(matchingEvent);Regards,
Jayashree K R
All replies
-
Hi Jayashree,
Thank you for posting in the MSDN Forum.
I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.
Sorry for any inconvenience and have a nice day!
Best regards,
Quist Zhang [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
Hi Jayashree, Have you tried the code base http://support.microsoft.com/kb/201087 in custom form?
DeVa, M.S., {MSFT} Please remember to mark the replies as answers if they help
-
Hi Deva,
I am doing the same. One thing I observed is, while changing the message class IPM.Appointment is reflecting whereas IPM.Appointment.Scheduler is not reflecting. After the appt.Save statement the message class is reverting back to IPM.Appointment.Scheduler. I am just wondering if this exposed to the developers.
Regards,
Jayashree K R
-
Jayashree,
Have you verified whether the code is running and modifying the messageclass or not? Because, I notice a related article which talks about appointment item http://support.microsoft.com/kb/321690
DeVa, M.S., {MSFT} Please remember to mark the replies as answers if they help
-
-
-
In addition, you can give a try download omsgclas.exe from the following link (http://support.microsoft.com/kb/201089) and see whether it helps you to move ahead or not. If you still facing issue, you can consider to submit a support ticket!!
DeVa, M.S., {MSFT} Please remember to mark the replies as answers if they help
-
Hi, i am new to outlook Addin 2007 development. I am using Custom forms for Appointments in Outlook. Inside my program i am changing the Message class from an existing default form "IPM.Appointment" to my own custom form "IPM.Appointment.MyCustomForm".
Now the problem that i am Facing is that the newly applied custom form is not showing for that particular appointment, even though the message class is updated. But when i reload the Outlook application, the new custom forms are displaying for the appointment item.
can anyone please help me on this?
-