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.StringThe name of the default document to be altered.
contentTypeId
Type: Microsoft.SharePoint.SPContentTypeIdA struct that uniquely identifies the content type to apply to the named document.
Return Value
Type: System.Boolean
true if the operation succeeded; otherwise, false.
See Also
Reference
DefaultDocumentCollection Class