Outlook macro to confirm reply or reply all when sending

0

0

I often mistakenly select the Reply option when there are many people involving in the talk and I actually want to reply to all of them. Are there any ways to check this before sending the email?

phuclv

Posted 2014-08-05T06:00:13.247

Reputation: 14 930

Answers

0

You can interrupt reply in a similar manner as described in this question

Insert a new module like this and then in the ThisOutlookSession module paste the below code

Dim WithEvents insp As Outlook.Inspectors
Dim WithEvents mailItem As Outlook.MailItem

' This is called on Outlook startup
Private Sub Application_Startup()
    Set insp = Application.Inspectors
End Sub

' This is called when a new Inspector is created. 
Private Sub insp_NewInspector(ByVal Inspector As Inspector)
    If Inspector.CurrentItem.Class = olMail Then
       Set mailItem = Inspector.CurrentItem
    End If
End Sub

' Called when you press Reply
Private Sub mailItem_Reply(ByVal Response As Object, Cancel As Boolean)
    Dim msg As String
    Dim result As Integer
    If myMailItem.Recipients.count > 1 Then
        msg = "Do you really want to reply to one?"
        result = MsgBox(msg, vbYesNo, "Reply Check")
        If result = vbNo Then
            Cancel = True
        End If
    End If
End Sub

niton

Posted 2014-08-05T06:00:13.247

Reputation: 1 724