Autoarchive or a macro?
autoarchive - right click on the folder, choose properties, autoarchive tab.
pick an age to delete and enable archiving. Go to tools, options, other,
archive and turn it on.
You'll need to edit this to use the folder you choose - this does the junk
folder. See outlookcode.com if you need to learn how to do it.
Public Sub DeleteMail()
Dim myFolder As Outlook.MAPIFolder
Dim myItems As Outlook.Items
Dim i As Long
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderJunk)
Set myItems = myFolder.Items
For i = myItems.Count To 1 Step -1
myItems.Remove i
Next
End Sub
--
Diane Poremsky [MVP - Outlook]
EMO - a weekly newsletter about Outlook and Exchange:
(e-mail address removed)
You can access this newsgroup by visiting
http://www.microsoft.com/office/community/en-us/default.mspx or point your
newsreader to msnews.microsoft.com.
topcat said:
Probably if I knew how.
Diane Poremsky said:
you can use autoarchive to do it or a macro.
--
Diane Poremsky [MVP - Outlook]
EMO - a weekly newsletter about Outlook and Exchange:
(e-mail address removed)
You can access this newsgroup by visiting
http://www.microsoft.com/office/community/en-us/default.mspx or point
your
newsreader to msnews.microsoft.com.
topcat said:
I see "aEmpty Junk folder" option. Is there a way to add the empty
option
to
other folders?