When I create a new email message using the Outlook XP .NET API, it looks different than when it is created through the UI of Outlook itself.
For example, when creating a new email message, the To and CC buttons are flat and have the picture of the address book next to them.
When creating the email message through the .NET API, the new email message has the old 3D style To and CC buttons.
Other differences include different placement and availability of toolbar buttons which is confusing my users. Anyone know if there is something I can do to create an email message exactly the same way that Outlook does?
For example, when creating a new email message, the To and CC buttons are flat and have the picture of the address book next to them.
When creating the email message through the .NET API, the new email message has the old 3D style To and CC buttons.
Other differences include different placement and availability of toolbar buttons which is confusing my users. Anyone know if there is something I can do to create an email message exactly the same way that Outlook does?
Code:
Microsoft.Office.Interop.Outlook.MailItem msg = (Microsoft.Office.Interop.Outlook.MailItem)
new Microsoft.Office.Interop.Outlook.ApplicationClass().CreateItem(
Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
//Create a new email message
msg.To = strTo;
msg.Subject = strSubject;
msg.Body = strBody;
//strAttachment is the filename of a PDF file created elsewhere
msg.Attachments.Add(strAttachment, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, 1, "");
if (blnPrompt) {
//Display the new email message modally so the user can modify it
msg.Display(true);
} else {
msg.Send();
}