Compartir a través de


DocumentBase.Kind Property

Gets or sets the format type that Microsoft Office Word uses when automatically formatting the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public Property Kind As WdDocumentKind
public WdDocumentKind Kind { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdDocumentKind
One of the WdDocumentKind values.

Examples

The following code example sets the type that Word uses when automatically formatting the document as a letter. The code then displays a message that shows the type. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentKind()
    Me.Kind = Microsoft.Office.Interop.Word.WdDocumentKind.wdDocumentLetter
    MessageBox.Show(Me.Kind.ToString())
End Sub
private void DocumentKind()
{
    this.Kind = Microsoft.Office.Interop.Word.
        WdDocumentKind.wdDocumentLetter;
    MessageBox.Show(this.Kind.ToString());
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace