1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Outlook VBA question

Discussion in 'Tech Support' started by xxpokerxx, 11 Feb 2010.

  1. xxpokerxx

    xxpokerxx What's a Dremel?

    Joined:
    1 Feb 2010
    Posts:
    20
    Likes Received:
    0
    I am wanting a VBA script that will run on application exit/start-up (which ever is easier/more effective). The script has to do the following:

    1: Look in the default Mailbox's Sent Items folder
    2: Determine if a certain string is contained within the body of any of the emails
    3: Delete the meail that contains the string

    If any1 here knows how to do this I would be very appreciative, so would my boss :D

    Thanks guys, and I hope someone here knows :miffed:
     
  2. xxpokerxx

    xxpokerxx What's a Dremel?

    Joined:
    1 Feb 2010
    Posts:
    20
    Likes Received:
    0
    Progress

    Ok I have gotten somewhere, This looks in the inbox (not sent items as i need) but in my inbox there are multiple types of emails (appointment, mail, etc). This script gets an error when it encounters the appointment (wrong type, obviously). I am still looking, I will update / delete the thread if i figure it out.

     
  3. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    Why not use an Outlook mail rule or filter or whatever they're called?
     
  4. xxpokerxx

    xxpokerxx What's a Dremel?

    Joined:
    1 Feb 2010
    Posts:
    20
    Likes Received:
    0
    Because you cant use rules to accomplish what i needed.

    I did figure it out though and it is now working fine, please delete this thread as it is no longer needed.
     

Share This Page