![]() Set objWatchFolder = objNS.GetDefaultFolder(olFolderJunk) ![]() Set objNS = Application.GetNamespace("MAPI") Private WithEvents objItems As Outlook.Items VBA doesn't have a permanently delete command, so w need to move it to the Deleted Items and would need to delete it again. Also, the macro moves the junk mail to the Deleted items folder. Or use the macro at the end of the page to run the ItemAdd macro on any folder in your profile. If you have more than one data file, you'd need to watch each Junk Email folder. Notes: As written, these macros only work on the default junk email folder. ![]() This simple macro watches the default Junk Email folder for messages from one top-level domain. You can also use an ItemAdd macro to watch the Junk Email folder and delete mail as it is added to the Junk Mail folder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |