How to determine when new mail has arrived using BindEvents You can use the following code to create a COM server DLL and take action when a new e-mail arrives in Outlook. Please note that only the NewMail procedure is functional, but you can add your own code to make the others functional. Note: this code is based on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk00/html/ft00j1.asp Note2 : This code requires that VFPCOM Utility be installed in the target computer (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=1529819C-2CE8-4E89-895E-15209FCF4B2A) Note3 : This will work in VFP7.0 and up CODE #DEFINE VFPCOM_CLSID 'VFPCOM.COMUTIL' #DEFINE OUTLOOK_CLSID 'OUTLOOK.APPLICATION' public goVFPCOM, goOutlook, goLink goVFPCOM = create(VFPCOM_CLSID) goOutlook = create(OUTLOOK_CLSID) goLink = create('OutlookApplicationEvents') goVFPCOM.BindEvents(goOutlook, goLink) DEFINE CLASS OutlookApplicationEvents AS custom PROCEDURE ItemSend(Item,Cancel) ENDPROC PROCEDURE NewMail MessageBox('New Mail Has Arrived') ENDPROC PROCEDURE OptionsPagesAdd(Pages) ENDPROC PROCEDURE Quit ENDPROC PROCEDURE Reminder(Item) ENDPROC PROCEDURE Startup ENDPROC ENDDEFINE>Hi All,