Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting mail from Outlook Programmatically
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Deleting mail from Outlook Programmatically
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:
01119055
Vues:
59
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
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform