Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting Items in Outlook
Message
De
06/08/2001 15:14:14
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Deleting Items in Outlook
Divers
Thread ID:
00540334
Message ID:
00540334
Vues:
57
Hey--
I'm trying to write a program that will go through users email accounts (Microsoft Outlook) and delete messages from the Inbox and Deleted Items folders. So far, I have written this code:

loapp=CREATEOBJ('Outlook.Application')
loSpace=loapp.getnamespace('MAPI')
mmailbox="Mailbox - "+ALLT(GETE('name')) &&the way that we access specific users accounts
loInbox=loSpace.GetDefaultFolder(6)

mdelete=MESSAGEBOX("Do you want to delete the messages in the Inbox?",292)
DO CASE
CASE mdelete=6
FOR EACH item in loInbox.items
item.delete()
ENDFOR
CASE mdelete=7
ENDCASE

which does go through the inbox and begins to delete messages, but it doesn't delete all of them, it always leaves 2 or 3. Just wondering if there is some hole in this code that is causing that and if there is a delete all option or something of the sort for Outlook in VFP.

Thanks

Kent Floros
Ripon Community Printers
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform