Consulting

Results 1 to 6 of 6

Thread: How to auto-delete sent email (specified email) from the sent items folder?

  1. #1
    VBAX Regular
    Joined
    Dec 2009
    Posts
    17
    Location

    Question How to auto-delete sent email (specified email) from the sent items folder?

    Hi,

    There're rules to auto-delete emails when you receive email from someone you chose. But unfortunately, there's no such rule to auto-delete sent mail within sent items folder.

    Example:

    Lets say, I sent an email to example@example.com. Now, I want to delete this email from sent items folder automatically after sending is complete.

    How to do this?

    Thanks beforehand.

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    If you wanted to use VBA, you could set the MailItem.DeleteAfterSubmit Property to True. Use the Application_ItemSend Event for that.

    But I have to ask, why would you want to delete Sent Items? What if you need to read what you wrote? What if the recipient never receives the email?
    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
    Dec 2009
    Posts
    17
    Location
    I dont know how to set them to true. The reason to do this is way too different in my case. It's gonna be set on another PC to do these steps:

    If
    mail has an attachment
    then
    forward it to another email,
    delete all conversation ( this rule deletes item from Deleted Items folder )

    In the last step, it should also delete it from Sent Items folder too. However, "thanks to Microsoft", there's no way to do that using rules.

    Now I want to do last step using VBA or something else.

  4. #4
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    Google is your friend.

    A quick search on "DeleteAfterSubmit Property" turned up several useful hits, along with sample code.

    As an alternative, you could also set the Sent Items folder to your Deleted Items folder. That would serve the purpose of "deleting" a sent message. See the following for sample code

    To set the storage folder for an outgoing Outlook message

    Delete Expired Items (to empty the Deleted Items folder)
    Regards,
    JP

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

  5. #5
    VBAX Regular
    Joined
    Dec 2009
    Posts
    17
    Location
    Still couldn't find the exact solution even tried to look for deleteaftersubmit prop.

  6. #6
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Couldn't you just remove the option "Save copies of messages in Sent Items folder"?

Posting Permissions

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