I have a winforms application which works perfectly in my x64 Win 7 dev environment but I cannot get the Outlook feature to work at all on the x86 XP machine, I keep getting this error when I try to open up a new Outlook mail with the address/subject line pre-filled in from the application side.
This only started happening since adding the reference to: Microsoft.Office.Interop.Outlook
This is the code used to create a new mail:
private void CreateOutlookEmail(string addresses)
{
Outlook.Application outlookApp = new Outlook.Application();
Outlook.MailItem mailItem = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType.olMailItem);
mailItem.Subject = "";
mailItem.To = addresses;
mailItem.Body = "";
mailItem.Display(false);
}
I have been searching the forums for an answer but no luck thus far. Here is what I have tried without success:
- Set the platform target to x86 in project properties in VS2010
- Install the OWC11 binaries.
- Install all windows updates on the win XP machine.
Must I install other packs on the XP machine?