Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting Items in Outlook
Message
From
06/08/2001 15:14:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Deleting Items in Outlook
Miscellaneous
Thread ID:
00540334
Message ID:
00540334
Views:
58
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
Next
Reply
Map
View

Click here to load this message in the networking platform