• Macro to delete sent items (2002)

    Author
    Topic
    #400228

    Hi, how would i go about writing a macro to delete mails from my sent folder?

    I want to delete any that have been sent to certain people, and it has become tedious doing this manually at the end of each day. I have not done any VB in outlook before, does anyone have a good link for beginners?

    thanx

    Viewing 1 reply thread
    Author
    Replies
    • #779263

      Since you are new to VBA, why not try using rules? Create a rule as if the mail is incoming (don’t use after sending), select the sent folder and use Run Now. One rule should easily handle several addresses.

      • #779281

        Thanks, I have tried using rules in the past and used the ‘after sending’ way, which didnt have a ‘permanently delete’ option!

        I will try the other way. Can I assign a toolbar button to a specific rule?

        I am not new to VBA, i use VBA a lot in WORD, ACCESS, EXCEL and Visual Basic 6. Just never used it in OUTLOOK. ( There isnt the option to record Macros, which is always handy in getting to know an application’s methods in VBA)

        Thanks again,

        • #779652

          You can assign rules to toolbars. Outlook VBA is a bit funky compared to word and excel. It’s a not as easy and straightforward. Try http://www.outlookcode.com[/url%5D for more information about programming Outlook.

          • #779688

            Thanks MJ. coffeetime

            I will have a look and see what i can learn

            • #779902

              Although you can write VBA code for it, managing code that emulates Rules is more work than managing Rules, and Rules are always preferable. There’s a good discussion you should read in this thread (after we figure out what the original poster is talking about).

              A low maintenance solution would be use Rules to sweep the Sent mails you want to permanently delete to the Deleted Items Folder, and set Outlook to delete all Deleted Folder Items on closing Outlook; Tools | Options | Other | check (tick) the box “Empty the deleted items folder upon exiting”.

            • #779903

              Although you can write VBA code for it, managing code that emulates Rules is more work than managing Rules, and Rules are always preferable. There’s a good discussion you should read in this thread (after we figure out what the original poster is talking about).

              A low maintenance solution would be use Rules to sweep the Sent mails you want to permanently delete to the Deleted Items Folder, and set Outlook to delete all Deleted Folder Items on closing Outlook; Tools | Options | Other | check (tick) the box “Empty the deleted items folder upon exiting”.

          • #779689

            Thanks MJ. coffeetime

            I will have a look and see what i can learn

        • #779653

          You can assign rules to toolbars. Outlook VBA is a bit funky compared to word and excel. It’s a not as easy and straightforward. Try http://www.outlookcode.com[/url%5D for more information about programming Outlook.

      • #779282

        Thanks, I have tried using rules in the past and used the ‘after sending’ way, which didnt have a ‘permanently delete’ option!

        I will try the other way. Can I assign a toolbar button to a specific rule?

        I am not new to VBA, i use VBA a lot in WORD, ACCESS, EXCEL and Visual Basic 6. Just never used it in OUTLOOK. ( There isnt the option to record Macros, which is always handy in getting to know an application’s methods in VBA)

        Thanks again,

    • #779264

      Since you are new to VBA, why not try using rules? Create a rule as if the mail is incoming (don’t use after sending), select the sent folder and use Run Now. One rule should easily handle several addresses.

    Viewing 1 reply thread
    Reply To: Macro to delete sent items (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: