How do I check if Outlook has new mail using the Microsoft.Office.Interop assemblies?
I simply want to be able to check, while outlook is open, if it has new mail from a Windows forms application.
I'm able to capture the NewMail event(ApplicationEvents_11_NewMailEventHandler), but if new mail notification was already active before my code runs, it is not fired.
Also, how can I do this without Outlook popping up the warning windows about third party application access? In othe开发者_JAVA百科r words, how do I tell outlook to trust me? (That part may better suited to superuser)
精彩评论