Freigeben über


DocumentBase.Kind Property

Definition

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

public:
 property Microsoft::Office::Interop::Word::WdDocumentKind Kind { Microsoft::Office::Interop::Word::WdDocumentKind get(); void set(Microsoft::Office::Interop::Word::WdDocumentKind value); };
public Microsoft.Office.Interop.Word.WdDocumentKind Kind { get; set; }
member this.Kind : Microsoft.Office.Interop.Word.WdDocumentKind with get, set
Public Property Kind As WdDocumentKind

Property Value

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 void DocumentKind()
{
    this.Kind = Microsoft.Office.Interop.Word.
        WdDocumentKind.wdDocumentLetter;
    MessageBox.Show(this.Kind.ToString());
}
Private Sub DocumentKind()
    Me.Kind = Microsoft.Office.Interop.Word.WdDocumentKind.wdDocumentLetter
    MessageBox.Show(Me.Kind.ToString())
End Sub

Applies to