Share via


DocumentBase.Kind 屬性

取得或設定 Microsoft Office Word 自動格式化文件時使用的格式類型。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

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

屬性值

型別:Microsoft.Office.Interop.Word.WdDocumentKind
其中一個 WdDocumentKind 值。

範例

下列程式碼範例會將 Word 自動格式化文件時使用的格式類型設定為信件。 然後程式碼會顯示訊息,說明使用的格式類型。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

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 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間