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 命名空间