Hi Glenn,
There're two tnings you can try:
1. Change
aItem.delete
=aItem.delete()
2. Replace FOR EACH loop with FOR i=... loop
>In a Visual FoxPro 6 application I use Outlook Automation in a subroutine to Import Emails into my database. After Importing, I Delete the Emails from the Inbox. After compiling my application for Visual FoxPro 7 and also for Visual FoxPro 8, I find the Delete function gives me an OLE error. The Delete function still works in Visual FoxPro 6 without the error.
>
>OLE error code 0x8002000f: Parameter not optional (for aItem.delete).
>
>This is the segement of code:
>For Each aItem In oMyInbox.Items
> If aItem.Subject= MySubject
> aItem.delete
> Endif
>Next aItem
>I would appreciate any comments on why this is happening and any suggests to correct the problem.
>
>TIA
>Glenn Laymon
--sb--