WorkflowTasks Object (Office)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents a collection of WorkflowTask objects.

The following example displays the name of each workflow task in the current document and then displays the workflow task edit user interface for a specific task. It should be noted that calling the GetWorkflowTasks method involves a round-trip to the server.

Sub DisplayWorkTask() 
Dim objWorkflowTasks As WorkflowTasks 
Dim objWorkflowTask As WorkflowTask 
Dim cnt As Integer 
Set objWorkflowTasks = Document.GetWorkflowTasks() 
For cnt = 1 To objWorkflowTasks.Count 
 Debug.Print objWorkflowTask(cnt).Name 
Set objWorkflowTask = objWorkflowTasks(1) 
End Sub