Save email attachment and delete email
Currently I'm doing a program in VB5 where I will save
the email attachments in my Ms Outlook inbox. Once the
attachment is saved out, i will delete the email from
my inbox. I noticed that although my inbox has 4
emails, but my coding didn't loop through all the
emails and save the attachment. It will exit out from
the loop. If I don't delete the emails, the codes work
fine but once i execute the command to delete, i have
this problem. Please help !! Below is snippet of my
codes :
Dim oMessage as Object
Dim oFldr as Outlook.MAPIFolder
Set oFldr = oNS.GetDefaultFolder(olFolderInbox)
For each oMessage in oFldr.Items
'Loop and save all attachments in an email
oMessage.Delete
Next oMessage
set oFldr = Nothing
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~->
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [EMAIL PROTECTED]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/