Trying to automate Outlook as
Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office
The exception looks quite obvious, this should work
var myApp = new Microsoft.Office.Interop.Outlook.Application();
you just can't get a cast exception with that line above.