ONamespace := OApp.GetNamespace('mapi'); ONamespace.Logon(UserSetup."Outlook Profile",'',TRUE,TRUE); OMAPIFolder := ONamespace.PickFolder; OItems := OMAPIFolder.Items; OMailItem := OItems.GetFirst;
OApp 'Microsoft Outlook 9.0 Object Library'.Application ONamespace 'Microsoft Outlook 9.0 Object Library'.NameSpace OMAPIFolder 'Microsoft Outlook 9.0 Object Library'.MAPIFolder OItems 'Microsoft Outlook 9.0 Object Library'.Items OMailItem 'Microsoft Outlook 9.0 Object Library'.MailItem
Object := OItems.GetFirst; IF Object.Class = 46 THEN //(dont remember exactly) OMailItem := Object;Don't know how to define that object. Or any other solution?
Comments
UK
Can you supply any code/information on how you achieved this?