This documentation is archived and is not being maintained.

Workbook.GetWorkflowTemplates Method (2007 System)

Returns the collection of workflow templates for the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

public WorkflowTemplates GetWorkflowTemplates()

Return Value

Type: WorkflowTemplates
A Microsoft.Office.Core.WorkflowTemplates collection that contains the workflow templates for the workbook.

The following code example displays the number of workflow templates that are available for the workbook. If one or more workflow templates exist, the example displays the name and description of each template.

To run this code example, you must publish the workbook to an Office SharePoint Server 2007 site.

This example is for a document-level customization.

private void DisplayWorkflowTemplates()
    Office.WorkflowTemplates workflowTemplates = 
    MessageBox.Show("Number of workflow templates found: " 
        + workflowTemplates.Count.ToString());
    StringBuilder sb = new StringBuilder();
    sb.Append("Workflow Template List\r\n");
    foreach (Office.WorkflowTemplate template in workflowTemplates)
        sb.Append("\r\n" + template.Name + " Template" 
            + "\r\nDescription: " + template.Description);
    if (workflowTemplates.Count > 0)