PDA

View Full Version : Purge Deleted emails from IMAP Folder



radach
04-12-2006, 06:44 AM
I have been trying to find a method or proedure that I can include in my exit script that will basically complete the "Edit -> Purge Deleted Messages" function for Outlook 2003 and an IMAP server... Any ideas?

Killian
04-12-2006, 07:40 AM
Hi and welcome to VBAX :hi:

I'm not on an IMAP server so I can't test this, but there's some code and further discussions here (http://www.outlookcode.com/codedetail.aspx?id=427) that address this

Hope it helps

radach
04-12-2006, 07:58 AM
Thanks... it sort of does what i want.. however it filters through all imap folders and I need it to only look atthe inbox and deleted items folder... Got to play around with it... If anyone has any more direct way of doing it other than in the like Killian provided im all ears/

Killian
04-12-2006, 08:24 AM
Now I've had a closer look at the posts and the OL Object model it would appear that there isn't a direct method available - just excecuting the command button.
So it would be just this bit wouldn't it?Dim myBar As CommandBar
Set myBar = Application.ActiveExplorer.CommandBars("Menu Bar")
Dim myButtonPopup As CommandBarPopup
Set myButtonPopup = myBar.Controls("Edit")
Dim myButton As CommandBarButton
Set myButton = myButtonPopup.Controls("Purge Deleted Messages")
myButton.Execute