U
Uncle Vito
Using VSTO 2005 SE and Outlook 2003 (SP2), I am attempting to take a message
that resides in the inbox, copy it to another folder, present it to the user
for editing and be done. Upon selection of a context menu entry the
following code is executed which simply copies the message, changes the
message class, saves the message, moves it to a the destination folder and
displays the message for editing. "IFGXChange" is a form published on the
destination folder and to be sure I even published it on the inbox.
My issue is that when I invoke the Display of that message it is displayed
using the default form and not the one which is affiliated with the message
class. However, if I close the message and then view the message from the
target folder it is displayed using the correct form.
Is there something obvious I am missing in order to get the correct form
displayed for editing the message.
try
{
Outlook.MailItem copyMail = mail.Copy() as Outlook.MailItem;
copyMail.MessageClass = "IPM.Note.IFGXChange";
copyMail.To = "P-US-Interfaces Tech";
copyMail.Save();
copyMail.Move(_oTechFolder);
copyMail.Display(true);
}
catch (Exception exception)
that resides in the inbox, copy it to another folder, present it to the user
for editing and be done. Upon selection of a context menu entry the
following code is executed which simply copies the message, changes the
message class, saves the message, moves it to a the destination folder and
displays the message for editing. "IFGXChange" is a form published on the
destination folder and to be sure I even published it on the inbox.
My issue is that when I invoke the Display of that message it is displayed
using the default form and not the one which is affiliated with the message
class. However, if I close the message and then view the message from the
target folder it is displayed using the correct form.
Is there something obvious I am missing in order to get the correct form
displayed for editing the message.
try
{
Outlook.MailItem copyMail = mail.Copy() as Outlook.MailItem;
copyMail.MessageClass = "IPM.Note.IFGXChange";
copyMail.To = "P-US-Interfaces Tech";
copyMail.Save();
copyMail.Move(_oTechFolder);
copyMail.Display(true);
}
catch (Exception exception)