Partager via


Task.Close Method (Word)

Closes the specified task.

Syntax

expression .Close

expression Required. A variable that represents a Task object.

Example

This example activates Microsoft Excel and then closes it.

For Each myTask In Tasks 
 If InStr(myTask.Name, "Microsoft Excel") > 0 Then 
 myTask.Activate 
 myTask.Close 
 End If 
Next myTask

See Also

Concepts

Task Object Members

Task Object