oObj = CREATEOBJECT("Outlook.Application") oEvents = NEWOBJECT("myclass","c:\foxtemp\outlook.prg") oIEvents = NEWOBJECT("myItems","c:\foxtemp\outlook.prg") oItems = oObj.Session.GetDefaultFolder(6).Items EVENTHANDLER(oObj, oEvents) EVENTHANDLER(oItems, oIEvents) oName = oObj.GetNamespace("MAPI") oFolder = oName.GetDefaultFolder(6) oFolder.Display() RETURN(The myclass & myitems classes are defined of course)
PROCEDURE ItemsEvents_ItemAdd(Item AS VARIANT) AS VOID * add user code here = MESSAGEBOX("Adding an Item") ENDPROCIt seems that if I move an email into the Inbox, the ItemAdd method should trigger and display my messagebox, but that isn't happening.