![]() This macro is attached to the last phase of the application's lifecycle it runs when Outlook starts up. ![]() 'Debug.Print oFilteredItems.Count & " items left" ' the remove method permanently deletes the item. Set oFilteredItems = (" 0ĭebug.Print " " & oItem.UnRead & " " & oItem.Subject ' you can modify the filter to suit your needs Set oFolder = oFolder.Folders("Storage").Folders("batch runs")ĭebug.Print "checking " & oFolder.FolderPathĭebug.Print "for msgs older than " & oDate ' this was the sub-folder I wanted to cleanup. ' you can use this command to select a folder ODate = DateAdd("d", -MSG_AGE_IN_DAYS, Now()) Private Sub Application_MAPILogonComplete() Here's what I came up with: Option Explicit I have to use a macro as auto-archive is disabled for my installation. I had been looking for something similar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |