Share via


_TaskItem.Respond Method

Responds to a task request.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Function Respond ( _
    Response As OlTaskResponse, _
    fNoUI As Object, _
    fAdditionalTextDialog As Object _
) As TaskItem
'Usage
Dim instance As _TaskItem
Dim Response As OlTaskResponse
Dim fNoUI As Object
Dim fAdditionalTextDialog As Object
Dim returnValue As TaskItem

returnValue = instance.Respond(Response, _
    fNoUI, fAdditionalTextDialog)
[DispIdAttribute()]
TaskItem Respond(
    OlTaskResponse Response,
    Object fNoUI,
    Object fAdditionalTextDialog
)

Parameters

  • fNoUI
    Type: System.Object

    True to not display a dialog box; the response is sent automatically. False to display the dialog box for responding.

  • fAdditionalTextDialog
    Type: System.Object

    False to not prompt the user for input; the response is displayed in the inspector for editing. True to prompt the user to either send or send with comments. This argument is valid only if fNoUI is False.

Return Value

Type: Microsoft.Office.Interop.Outlook.TaskItem
A TaskItem that represents the response to the task request.

Remarks

When you call the Respond method with the olTaskAccept argument, Microsoft Outlook creates a new TaskItem that duplicates the task request item. The new item has a different Entry ID. Outlook then removes the original item.

The following table describes the behavior of the Respond method depending on the parent object, and the fNoUI and fAdditionalTextDialog parameters.

fNoUI, fAdditionalTextDialog

Result

True, True

Response item is returned with no user interface. To send the response, you must call the Send method.

True, False

Same result as with True, True.

False, True

If the Display method has been called, the user prompt appears. Otherwise, the item is sent without prompting and the resulting item is nothing.

False, False

Does nothing.

See Also

Reference

_TaskItem Interface

_TaskItem Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Respond to a Task Request Item