How can an external program check, if MS Outlook has received mail?
thx, vbzero
Printable View
How can an external program check, if MS Outlook has received mail?
thx, vbzero
The sample code must be placed in a class module, and the Initialize_handler routine must be called before the event procedure can be called by Microsoft Outlook.VB Code:
Dim WithEvents myOlApp As Outlook.Application Sub Initialize_handler() Set myOlApp = CreateObject("Outlook.Application") End Sub Private Sub myOlApp_NewMail() MsgBox "New mail has arrived, you lucky thing" End Sub