Task.Close method (Word)
Closes the specified task.
expression.Close
expression Required. A variable that represents a 'Task' object.
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
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.