How to Prompt Before Reply to All in Outlook

0

This should be very simple, but it isn't.

I want Outlook to Prompt me before sending a Reply-to-all email.

There is an add-in called NoReply to all, but this still requires the user to activate the no-reply-to all each session, which basically defeats its purpose.

The code below works, but applies to all replies, and I want to only apply it to repy-to all.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If MsgBox("Do you want to continue sending the mail?", vbOKCancel) <> vbOK Then
        Cancel = True
    End If
End Sub

Microsoft's example should work, but it doesn't:

Public WithEvents myItem As MailItem
Sub Initialize_Handler()
 Set myItem = Application.ActiveInspector.CurrentItem
End Sub
Private Sub myItem_ReplyAll(ByVal Response As Object, Cancel As Boolean)
    Dim mymsg As String
    Dim myResult As Integer
    mymsg = "Do you really want to reply to all original recipients?"
    myResult = MsgBox(mymsg, vbYesNo, "Flame Protector")
    If myResult = vbNo Then
       Cancel = True
    End If
End Sub

Other solutions are not free.

Any help?

Martien Lubberink

Posted 2017-10-22T19:48:53.807

Reputation: 129

Answers

0

Found it, and it includes a check to prevent sending to a specific list:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim str As String
Dim j As Integer
Dim splits() As String
Dim lbadFound  As Boolean
lbadFound = False
Set Recipients = Item.Recipients
receivers = Recipients.count
For i = receivers To 1 Step -1
    Set recip = Recipients.Item(i)
    If InStr(1, LCase(recip), "lists.bla.com") >= 1 Then
        lbadFound = True
    End If
Next i
splits = Split(Item.To, ";")
If receivers > 1 Or lbadFound Or UBound(splits) > 0 Then
    If MsgBox("Do you want to continue sending the mail?", vbOKCancel) <> vbOK Then
        Cancel = True
    End If
End If

End Sub

Martien Lubberink

Posted 2017-10-22T19:48:53.807

Reputation: 129