Observação: estou trabalhando em 2007, mas acho que o código deve ser transferido OK.
Você pode adicionar um manipulador de eventos por meio do VBA para selecionar o evento ReplyAll
. Algo como o seguinte:
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. You use it to pick up on a new mail item event
Private Sub insp_NewInspector(ByVal Inspector As Inspector)
If Inspector.CurrentItem.Size = 0 And Inspector.CurrentItem.Class = olMail Then
Set mailItem = Inspector.CurrentItem
End If
End Sub
' Called when you press ReplyAll
Private Sub mailItem_ReplyAll(ByVal Response As Object, Cancel As Boolean)
Dim msg As String
Dim result As Integer
msg = "Do you really want to reply to all?"
result = MsgBox(msg, vbYesNo, "Reply All Check")
If result = vbNo Then
Cancel = True
End If
End Sub