Compartilhar via


SPContentType.NewDocumentControl Property

Gets or sets a string that identifies the application used to create new documents.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Property NewDocumentControl As String
    Get
    Set
'Usage
Dim instance As SPContentType
Dim value As String

value = instance.NewDocumentControl

instance.NewDocumentControl = value
public string NewDocumentControl { get; set; }

Property Value

Type: System.String
The programmatic identifier of the application. The default value is String.Empty.

Remarks

This property can be used to identify an ActiveX control for creating documents based on a form template. For example, the following code identifies the template and application to use for a particular content type, represented in the code by the local variable contentType.

contentType.DocumentTemplate = "ContentType/Forms/template.xsn";
contentType.NewDocumentControl = "Sharepoint.OpenXMLDocuments";
contentType.RequireClientRenderingOnNew = false;
contentType.DocumentTemplate = "ContentType/Forms/template.xsn"
contentType.NewDocumentControl = "Sharepoint.OpenXMLDocuments"
contentType.RequireClientRenderingOnNew = False

See Also

Reference

SPContentType Class

SPContentType Members

Microsoft.SharePoint Namespace

Other Resources

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy