다음을 통해 공유


ReplyAll Event

Occurs when the user selects the ReplyAll action for a Microsoft Outlook item.

Subobject**_ReplyAll(ByVal Response As Object, Cancel As Boolean)**

*object   * An expression that evaluates to one of the objects in the Applies To list.

*Response   * The new item being sent in response to the original message.

*Cancel   * Optional. False when the event occurs. If the event procedure sets this argument to True, the reply all operation is not completed and the new item is not displayed.

Example

This Visual Basic for Applications (VBA) example uses the ReplyAll event and reminds the user that proceeding will reply to all original recipients of an item and, depending on the user's response, either allows the action to continue or stops it. To use this example, open an existing mail item, run the Initialize Handler() procedure, then reply to the item.

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

Applies to | AppointmentItem Object | ContactItem Object | DistListItem Object | DocumentItem Object | JournalItem Object | MailItem Object | MeetingItem Object | PostItem Object | RemoteItem Object | ReportItem Object | TaskItem Object | TaskRequestAcceptItem Object | TaskRequestDeclineItem Object | TaskRequestItem Object | TaskRequestUpdateItem Object

See Also | Close Method | CustomAction Event | CustomPropertyChange Event | Forward Event | Open Event | PropertyChange Event | Read Event | Reply Event | Send Method | Using events with Automation | Write Event