Hi. I'm trying to write code to do this. I am using Visual Studio 2005 and have Visual Studio Tools for Microsoft Office SE installed. I created a new project using the Outlook addin for Office 2007 and used the following code which I got from MSDN help;
Private
Sub CreateMailItem() Dim mailItem As Outlook.MailItem = _ Me.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)mailItem.Subject =
"This is the subject"mailItem.To =
"Rudolph.Scott@iop.kcl.ac.uk"mailItem.Body =
"This is the message."mailItem.Importance = Outlook.OlImportance.olImportanceLow
mailItem.Display(
False) End Sub
The problem is it keeps saying that CreateItem is not a member of the project. I originally had this code working with Outlook 2003 and it worked fine. Can someone tell me where I am going wrong and provide a solution Thanks.