Consulting

Results 1 to 3 of 3

Thread: Automate "empty deleted Items" from code

  1. #1
    VBAX Regular
    Joined
    Jul 2010
    Posts
    66
    Location

    Automate "empty deleted Items" from code

    I've got some code that allows me to go through all of the folders in my namespace, extract the information on the emails and put them into an access (2007) table, save any attachments into a folder system, save the email into the same folder as the attachments as a .msg, then delete the email.

    I want to automate the emptying of the deleted items folder, so that, after each folder, it will be empty...

    right now, I have alot of emails that are archived, and when I bring them back, and resurrect them from the 'vault' my mailbox is too full to do anything.

    In the future, it shouldn't be any problem... but I want to put it in the code, if it can be done, now... that way, i don't have to remember to empty it afterward...

    any help would be appreciated.

    (after i get the code like I want it, I'll be posting it)

    GComyn

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    The simplest way would be to loop through the Deleted Items folder and delete each item found there. That will permanently delete the messages.

    http://www.codeforexcelandoutlook.co...expired-items/
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

  3. #3
    VBAX Regular
    Joined
    Jul 2010
    Posts
    66
    Location
    Thanks... seems to be the way to do it.

    GComyn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •