Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to create an Outlook rule that stops me from sending out emails that have more than ten email addresses in the "To:" line. Is this even possible? I'm using Outlook 2010 on Windows 7 64-bit.

My reasoning: I send out a distribution letter to a large number of addresses. I usually send this email to myself with the distribution list addresses in the "BCC:" line. Every once in a while I mess up and accidentally put the distribution list addresses on the "To:" line instead. This is a problem because then each email recipient will see all the addresses on the list. I want Outlook to stop me from doing this, or at least warn me before I send it out.

I also welcome suggestions on how to get around this problem.

share|improve this question

3 Answers 3

Unfortunately, this is not possible with Outlook. While you can use third-party solutions to limit it (i.e., Thunderbird), you lose the functionality of Outlook itself. This is actually a great question, though, and I would love to see Microsoft provide a little better control over what you can and can't send out!

share|improve this answer
    
I was afraid of that. Thank you for answering. –  Erick Jul 6 '12 at 20:15
    
No problem; I can't count the number of times I have done exactly what you're trying to prevent yourself from doing. It's too bad the rules aren't more flexible! –  Andrew M. Jul 6 '12 at 20:39

There's no built-in way to do this, but you can achieve it with a macro.

Steps1:

  1. In Outlook, press Alt + F11 to open Microsoft Visual Basic.

  2. On the left side of the screen, expand the folder called Microsoft Office Outlook and select ThisOutlookSession.2

  3. In the window VbaProject.OTM - TheOutlookSession, select Application in the left and ItemSend in the right drop-down menu.2

  4. Replace the code that apperaed in the window's body by the following:

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
        Dim Recipients As Integer
        Dim Start As Integer
        Dim Last As Integer
        Recipients = 1
        Do
            Start = Last + 1
            Last = InStr(Start, Item.To, ";")
            If Last = 0 Then Exit Do
            Recipients = Recipients + 1
        Loop
        If (Recipients > 10) Then
            Cancel = (MsgBox(Str(Recipients) & " recipients in To field.", vbOKCancel) = vbCancel)
        End If
    End Sub
    
  5. Press Ctrl + S to save.

  6. Press Alt + Q to return to Outlook.

This macro will display a warning if there are more than 10 recipients in the To field (based on the number of semicolons used to delimit the recipients). You can click OK to dismiss the warning or Cancel to abort.3


1 I'm using Outlook 2007 (in Spanish). I hope Outlook 2010 is similar.

2
screenshot

3
screenshot

share|improve this answer

I took Sudo's answer and made it count the recipients in CC and BCC as well, just In case anyone wants it (I tried to do a comment on their answer, but not enough rep).

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim Recipients As Integer
    Dim Start As Integer
    Dim Last As Integer
    Dim RecipientFields As String
    Recipients = 1

    RecipientFields = Item.To

    If (Item.CC <> "") Then
        RecipientFields = RecipientFields + ";" + Item.CC
    End If

    If (Item.BCC <> "") Then
        RecipientFields = RecipientFields + ";" + Item.BCC
    End If

    Do
        Start = Last + 1
        Last = InStr(Start, RecipientFields, ";")
        If Last = 0 Then Exit Do
        Recipients = Recipients + 1
    Loop

    If (Recipients > 6) Then
        Cancel = (MsgBox("You have " & Str(Recipients) & " recipients in To/CC/BCC fields.  Click OK to send.", vbOKCancel) = vbCancel)
    End If
End Sub
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.