C
chris
I am writing a peice of code in c# which loads a msg file and depending
on its messageclass I load it into the appropriate Outlook item and
perform some operations (like SaveAs) on it.
Is there a full list of message classes that I can refer to?
This is what I have at the moment and I would like to get a full List
of messageclasses for completeness:
switch (messageClass)
{
case "IPM.Appointment": //AppointmentItem
{
AppointmentItem myAppointment = (AppointmentItem)oMailItem;
myAppointment.SaveAs(strTxtFilename, MailFileType);
myAppointment = null;
break;
}
case "IPM.Contact": //ContactItem
{
ContactItem myContactItem = (ContactItem)oMailItem;
myContactItem.SaveAs(strTxtFilename, MailFileType);
myContactItem = null;
break;
}
case "IPM.Contact.DSIContact": //ContactItem
{
ContactItem myContactItem = (ContactItem)oMailItem;
myContactItem.SaveAs(strTxtFilename, MailFileType);
myContactItem = null;
break;
}
case "IPM.Activity": //JournalItem
{
JournalItem myJournalItem = (JournalItem)oMailItem;
myJournalItem.SaveAs(strTxtFilename, MailFileType);
myJournalItem = null;
break;
}
case "IPM.Outlook.Recall": //MailItem
{
MailItem myMailItem = (MailItem)oMailItem;
myMailItem.SaveAs(strTxtFilename, MailFileType);
myMailItem = null;
break;
}
case "IPM.Note": //MailItem
{
MailItem myMailItem = (MailItem)oMailItem;
myMailItem.SaveAs(strTxtFilename, MailFileType);
myMailItem = null;
break;
}
case "IPM.Schedule.Meeting.Canceled": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.Schedule.Meeting.Request": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.Schedule.Meeting.Resp.Pos": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.Schedule.Meeting.Resp.Neg": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.StickyNote": //NoteItem
{
NoteItem myNoteItem = (NoteItem)oMailItem;
myNoteItem.SaveAs(strTxtFilename, MailFileType);
myNoteItem = null;
break;
}
case "IPM.Document.[ClassID]": //OfficeDocumentItem
{
DocumentItem myDocumentItem = (DocumentItem)oMailItem;
myDocumentItem.SaveAs(strTxtFilename, MailFileType);
myDocumentItem = null;
break;
}
case "IPM.Post": //PostItem
{
PostItem myPostItem = (PostItem)oMailItem;
myPostItem.SaveAs(strTxtFilename, MailFileType);
myPostItem = null;
break;
}
case "IPM.Remote": //RemoteItem
{
RemoteItem myRemoteItem = (RemoteItem)oMailItem;
myRemoteItem.SaveAs(strTxtFilename, MailFileType);
myRemoteItem = null;
break;
}
case "IPM.Report": //ReportItem
{
ReportItem myReportItem = (ReportItem)oMailItem;
myReportItem.SaveAs(strTxtFilename, MailFileType);
myReportItem = null;
break;
}
case "REPORT.IPM.Note.IPNRN": //ReportItem
{
ReportItem myReportItem = (ReportItem)oMailItem;
myReportItem.SaveAs(strTxtFilename, MailFileType);
myReportItem = null;
break;
}
case "IPM.Task": //TaskItem
{
TaskItem myTaskItem = (TaskItem)oMailItem;
myTaskItem.SaveAs(strTxtFilename, MailFileType);
myTaskItem = null;
break;
}
case "IPM.TaskRequest": //TaskRequestItem
{
TaskRequestItem myTaskRequestItem = (TaskRequestItem)oMailItem;
myTaskRequestItem.SaveAs(strTxtFilename, MailFileType);
myTaskRequestItem = null;
break;
}
case "IPM.TaskRequest.Accept": //TaskRequestItem
{
TaskRequestItem myTaskRequestItemAcc = (TaskRequestItem)oMailItem;
myTaskRequestItemAcc.SaveAs(strTxtFilename, MailFileType);
myTaskRequestItemAcc = null;
break;
}
case "IPM.TaskRequest.Decline": //TaskRequestItem
{
TaskRequestItem myTaskRequestItemDec = (TaskRequestItem)oMailItem;
myTaskRequestItemDec.SaveAs(strTxtFilename, MailFileType);
myTaskRequestItemDec = null;
break;
}
default:
{
break;
}
}
Thanks in advance,
Chris
on its messageclass I load it into the appropriate Outlook item and
perform some operations (like SaveAs) on it.
Is there a full list of message classes that I can refer to?
This is what I have at the moment and I would like to get a full List
of messageclasses for completeness:
switch (messageClass)
{
case "IPM.Appointment": //AppointmentItem
{
AppointmentItem myAppointment = (AppointmentItem)oMailItem;
myAppointment.SaveAs(strTxtFilename, MailFileType);
myAppointment = null;
break;
}
case "IPM.Contact": //ContactItem
{
ContactItem myContactItem = (ContactItem)oMailItem;
myContactItem.SaveAs(strTxtFilename, MailFileType);
myContactItem = null;
break;
}
case "IPM.Contact.DSIContact": //ContactItem
{
ContactItem myContactItem = (ContactItem)oMailItem;
myContactItem.SaveAs(strTxtFilename, MailFileType);
myContactItem = null;
break;
}
case "IPM.Activity": //JournalItem
{
JournalItem myJournalItem = (JournalItem)oMailItem;
myJournalItem.SaveAs(strTxtFilename, MailFileType);
myJournalItem = null;
break;
}
case "IPM.Outlook.Recall": //MailItem
{
MailItem myMailItem = (MailItem)oMailItem;
myMailItem.SaveAs(strTxtFilename, MailFileType);
myMailItem = null;
break;
}
case "IPM.Note": //MailItem
{
MailItem myMailItem = (MailItem)oMailItem;
myMailItem.SaveAs(strTxtFilename, MailFileType);
myMailItem = null;
break;
}
case "IPM.Schedule.Meeting.Canceled": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.Schedule.Meeting.Request": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.Schedule.Meeting.Resp.Pos": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.Schedule.Meeting.Resp.Neg": //MeetingRequestItem
{
MeetingItem myMeetingRequestItem = (MeetingItem)oMailItem;
myMeetingRequestItem.SaveAs(strTxtFilename, MailFileType);
myMeetingRequestItem = null;
break;
}
case "IPM.StickyNote": //NoteItem
{
NoteItem myNoteItem = (NoteItem)oMailItem;
myNoteItem.SaveAs(strTxtFilename, MailFileType);
myNoteItem = null;
break;
}
case "IPM.Document.[ClassID]": //OfficeDocumentItem
{
DocumentItem myDocumentItem = (DocumentItem)oMailItem;
myDocumentItem.SaveAs(strTxtFilename, MailFileType);
myDocumentItem = null;
break;
}
case "IPM.Post": //PostItem
{
PostItem myPostItem = (PostItem)oMailItem;
myPostItem.SaveAs(strTxtFilename, MailFileType);
myPostItem = null;
break;
}
case "IPM.Remote": //RemoteItem
{
RemoteItem myRemoteItem = (RemoteItem)oMailItem;
myRemoteItem.SaveAs(strTxtFilename, MailFileType);
myRemoteItem = null;
break;
}
case "IPM.Report": //ReportItem
{
ReportItem myReportItem = (ReportItem)oMailItem;
myReportItem.SaveAs(strTxtFilename, MailFileType);
myReportItem = null;
break;
}
case "REPORT.IPM.Note.IPNRN": //ReportItem
{
ReportItem myReportItem = (ReportItem)oMailItem;
myReportItem.SaveAs(strTxtFilename, MailFileType);
myReportItem = null;
break;
}
case "IPM.Task": //TaskItem
{
TaskItem myTaskItem = (TaskItem)oMailItem;
myTaskItem.SaveAs(strTxtFilename, MailFileType);
myTaskItem = null;
break;
}
case "IPM.TaskRequest": //TaskRequestItem
{
TaskRequestItem myTaskRequestItem = (TaskRequestItem)oMailItem;
myTaskRequestItem.SaveAs(strTxtFilename, MailFileType);
myTaskRequestItem = null;
break;
}
case "IPM.TaskRequest.Accept": //TaskRequestItem
{
TaskRequestItem myTaskRequestItemAcc = (TaskRequestItem)oMailItem;
myTaskRequestItemAcc.SaveAs(strTxtFilename, MailFileType);
myTaskRequestItemAcc = null;
break;
}
case "IPM.TaskRequest.Decline": //TaskRequestItem
{
TaskRequestItem myTaskRequestItemDec = (TaskRequestItem)oMailItem;
myTaskRequestItemDec.SaveAs(strTxtFilename, MailFileType);
myTaskRequestItemDec = null;
break;
}
default:
{
break;
}
}
Thanks in advance,
Chris