Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to delete sent items (2002)

    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
    Thanks,

    pmatz

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Roanoke area, Virginia, USA
    Posts
    3,729
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to delete sent items (2002)

    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.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to delete sent items (2002)

    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,
    Thanks,

    pmatz

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Roanoke area, Virginia, USA
    Posts
    3,729
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to delete sent items (2002)

    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 for more information about programming Outlook.

  5. #5
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to delete sent items (2002)

    Thanks MJ. <img src=/S/coffeetime.gif border=0 alt=coffeetime width=32 height=48>

    I will have a look and see what i can learn [img]/forums/images/smilies/wink.gif[/img]
    Thanks,

    pmatz

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro to delete sent items (2002)

    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 <!post=this,311128>this<!/post> 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".
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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