Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Error Code - Parameter Not Optional
Message
 
 
To
28/04/2003 22:11:20
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00782556
Message ID:
00782557
Views:
14
Hi Glenn,

There're two tnings you can try:
1. Change
aItem.delete 
*to 
=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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform