+ Reply to Thread
Results 1 to 2 of 2

scan recipient address, display warning (prevent reply to listserv)

Hybrid View

  1. #1
    Registered User
    Join Date
    05-03-2004
    Posts
    39

    scan recipient address, display warning (prevent reply to listserv)

    Dear all,

    I am new to outlook programming, and am seeking advice on something I hope should be easy to solve:
    I am trying to write a macro that scans the recipient addresses of emails I am sending (to, cc, and bcc) for predefined words. In this specific case, I would like it to search for “listserv”.
    If the word is contained in a recipient’s address, outlook should display a warning message that is customizable (e.g., “Are you sure you want to reply to the entire list?”) BEFORE placing the email into the outbox.

    If you have any ideas, please share them.
    Thanks a lot!
    as

  2. #2
    Registered User
    Join Date
    11-09-2008
    Location
    germany
    Posts
    74

    Re: scan recipient address, display warning (prevent reply to listserv)

    Hi as,

    I see nobody has picked up your question. Here is in theory what you need to do. If you get some code together and it does not work for you just post back here and I will help you with your specific question or fault.

    I assume you are using Outlook to do this code?

    If yes then you need to work with an event of the outlook application

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    
    End Sub
    This above event fires when you send anything.

    Thus I would suggest that within this event you do the following;

    1. Check that "Item" is a mailobject - it could be a calendar or task or something else.
    2. If mailobject then check the to, cc and bcc for your text. use the "instr" function
    3. If this comes back as yes then you put raise a message with a yes/no box asking whether they really want to send it
    4. If they click NO then you have Cancel = Yes which will cancel the send.
    5. Otherwise you let it go through.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1