I have some code:
Outlook.Application outLookApp = new
Outlook.Application();
Outlook.Inspector inspector = outLookApp.ActiveInspector();
Outlook.NameSpace nameSpace = outLookApp.GetNamespace("MAPI");
Outlook.MAPIFolder inbox = nameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
String sCriteria = "[SenderEmailAddress] = '
[email protected]'";
Outlook.Items filteredItems = inbox.Items.Restrict(sCriteria);
// totaly sure that count > 0;
Outlook.MailItem item = filteredItems[1];
In the last line I have error: "Cannot implicitly convert type 'object' to '
Microsoft.Office.Interop.
Outlook.MailItem'. An explicit conversion exists (are you missing a cast?)". I don't know why. Previous I used VisualStudio 2010 but my trial has expired. Is there any hope to run this on SharpDevelop?