Consulting

Results 1 to 3 of 3

Thread: Outlook 365 display message on replyAll mailitem event

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Oct 2023
    Posts
    2
    Location

    Outlook 365 display message on replyAll mailitem event

    I have tried putting the code in ThisOutlookSesssion mailitem send, reply and reply all and cant even hit a break point

    Any help greatly appreciated!
    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
    
    Private Sub mailItem_ReplyAll(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
    
    Private Sub mailItem_Send(Cancel As Boolean)
    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
    Last edited by Aussiebear; 10-02-2023 at 12:58 PM. Reason: Added code tags to supplied code

Posting Permissions

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