다음을 통해 공유


DefaultDocumentCollection.ChangeContentTypeForDocument Method

Changes the content type of the named default document to the specified content type.

Namespace:  Microsoft.Office.DocumentManagement.DocumentSets
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)

Syntax

'Declaration
Public Function ChangeContentTypeForDocument ( _
    name As String, _
    contentTypeId As SPContentTypeId _
) As Boolean
'Usage
Dim instance As DefaultDocumentCollection
Dim name As String
Dim contentTypeId As SPContentTypeId
Dim returnValue As Boolean

returnValue = instance.ChangeContentTypeForDocument(name, _
    contentTypeId)
public bool ChangeContentTypeForDocument(
    string name,
    SPContentTypeId contentTypeId
)

Parameters

  • name
    Type: System.String

    The name of the default document to be altered.

Return Value

Type: System.Boolean
true if the operation succeeded; otherwise, false.

See Also

Reference

DefaultDocumentCollection Class

DefaultDocumentCollection Members

Microsoft.Office.DocumentManagement.DocumentSets Namespace