Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting mail from Outlook Programmatically
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01119055
Message ID:
01119064
Vues:
15
Sometimes you need to store it in a variable. I'm not sure why, but try this.
lDelete = loItem.Delete
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform