Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting mail from Outlook Programmatically
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01119055
Message ID:
01119062
Views:
25
This message has been marked as a message which has helped to the initial question of the thread.
Maybe loItem.Delete() requires some parameters that are not optional. I have no Outlook installed to check, but you can check the syntaxis of Delete() method of Item Class.

>I am designing an email extractor program which is working fine except for at the end of my program I want to delete mail that is not relevant but I keep getting the following error:
>
>"OLE Error Code 0x8002000f: Parameter not optional."
>
>Anybody got any pointers??
>
>Here is my code:
>
>
>loOutlook = createobject('outlook.application')
>loNamespace = loOutlook.GetNameSpace("mapi")
>loTaskbox = loNamespace.GetDefaultFolder(6)   && task folder
>loitems = lotaskbox.Items
>
>for v = 1 to loitems.count
>	loItem = loitems.item(v)
>	with loItem
>		DO CASE
>			CASE .subject = 'RE: Hanger Booked into System'
>				? "Extracting Mail: ", loitem.subject
>			OTHERWISE
>				? "Deleting Mail: ", loitem.subject
>				loItem.Delete()
>		ENDCASE
>	endwith
>endfor
>
>
>Many Thanks
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform