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)
>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.