G
Guest
Hello,
I try to get the Currently Selected Item in an Outlook Folder in a COM
addin. I have an example
(http://support.microsoft.com/default.aspx?scid=kb;en-us;241287) but it is
not a Com example.
My problem is now to cast the selected item in a mail or appointment or note
item.
if (strMessageClass == "IPM.Appointment") // A calendar entry was selected {
_AppointmentItem olAppointmentItem;
olAppointmentItem = (_AppointmentItem) olItem;
AfxMessageBox(olAppointmentItem.GetSubject());
AfxMessageBox(olAppointmentItem.GetBody());
}
How do I have to chance the code to be able to use it in my COM addin?
if (strMessageClass == "IPM.Appointment") // A calendar entry was selected
{
CComPtr<Outlook::_AppointmentItem> olAppointmentItem;
olAppointmentItem = (_AppointmentItem) olItem; ??????????????
AfxMessageBox(olAppointmentItem.GetSubject());
AfxMessageBox(olAppointmentItem.GetBody());
}
Thank you for your help,
Thomas
I try to get the Currently Selected Item in an Outlook Folder in a COM
addin. I have an example
(http://support.microsoft.com/default.aspx?scid=kb;en-us;241287) but it is
not a Com example.
My problem is now to cast the selected item in a mail or appointment or note
item.
if (strMessageClass == "IPM.Appointment") // A calendar entry was selected {
_AppointmentItem olAppointmentItem;
olAppointmentItem = (_AppointmentItem) olItem;
AfxMessageBox(olAppointmentItem.GetSubject());
AfxMessageBox(olAppointmentItem.GetBody());
}
How do I have to chance the code to be able to use it in my COM addin?
if (strMessageClass == "IPM.Appointment") // A calendar entry was selected
{
CComPtr<Outlook::_AppointmentItem> olAppointmentItem;
olAppointmentItem = (_AppointmentItem) olItem; ??????????????
AfxMessageBox(olAppointmentItem.GetSubject());
AfxMessageBox(olAppointmentItem.GetBody());
}
Thank you for your help,
Thomas