Share via


ModifyTemplate Method

Description

Updates the name or description of an existing security template using the Microsoft Office Project Server 2003 security object.

Syntax

Function ModifyTemplate( _
   ByVal lTemplateID As Long, _
   ByVal bstrTemplateName As String, _
   ByVal bstrTemplateDesc As String _
) As Long

Parameters

Parameter Description

lTemplateID

Required Long. ID of the template to update, from MSP_WEB_SECURITY_TEMPLATES.WSEC_TMPL_ID.

bstrTemplateName

Required String. Name of the new template to create.

bstrTemplateDesc

Required String. Description of the template.

Return Value

The ModifyTemplate method returns HRESULT as a Long (4-byte integer) value.

Remarks

Example

The following example modifies a template description, for a security template created by the AddTemplate function. The example is for Microsoft Visual Basic 6.0.

Dim lResult as Long
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.ModifyTemplate(1001, "Template name", "New template description")
Set oSec = Nothing