SPWorkflowTemplateCollection.GetTemplateByName method

Gets the workflow template based on its name.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public Function GetTemplateByName ( _
    name As String, _
    cultureInfo As CultureInfo _
) As SPWorkflowTemplate
Dim instance As SPWorkflowTemplateCollection
Dim name As String
Dim cultureInfo As CultureInfo
Dim returnValue As SPWorkflowTemplate

returnValue = instance.GetTemplateByName(name, _
public SPWorkflowTemplate GetTemplateByName(
    string name,
    CultureInfo cultureInfo


  • name
    Type: System.String

    The name of the workflow template to return.

Return value

Type: Microsoft.SharePoint.Workflow.SPWorkflowTemplate
An SPWorkflowTemplate object that represents the workflow template.


This method gets the workflow template with the name specified by the name parameter. If no such template exists, this method returns null .

See also


SPWorkflowTemplateCollection class

SPWorkflowTemplateCollection members

Microsoft.SharePoint.Workflow namespace

Other resources

Workflows in Windows SharePoint Services

Workflow Development for Windows SharePoint Services

Workflow Object Model in Windows SharePoint Services Overview