DocumentBase.SummaryLength 属性

获取或设置摘要的长度(以占文档长度的百分比计)。

命名空间:  Microsoft.Office.Tools.Word
程序集:  Microsoft.Office.Tools.Word.v4.0.Utilities(在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

语法

声明
Public Property SummaryLength As Integer
public int SummaryLength { get; set; }

属性值

类型:System.Int32
摘要的长度(以占文档长度的百分比计)。

备注

该数字越大,摘要中包括的信息越详细。

此属性会在显示**“自动编写摘要”**工具栏时立即生效;否则,它会在下次将 AutoSummarize 方法或 SummaryViewMode 属性应用于文档时生效。

示例

下面的代码示例向文档中的第一个段落添加文本。 该代码然后显示摘要并将详细信息的级别设置为 50%。 若要使用此示例,请从文档级项目内的 ThisDocument 类中运行此示例。

Private Sub DocumentSummaryLength()

    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "The SummaryLength property" & _
        " returns or sets the length of the summary as a " & _
        " percentage of the document length. The larger the number," & _
        " the more detail that's included in the summary."

    Me.SummaryViewMode = Word.WdSummaryMode.wdSummaryModeHighlight

    Me.ShowSummary = True
    Me.SummaryLength = 50
End Sub 
private void DocumentSummaryLength()
{

    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "The SummaryLength property"
        + " returns or sets the length of the summary as a "
        + " percentage of the document length. The larger the number,"
        + " the more detail that's included in the summary.";

    this.SummaryViewMode = Word.WdSummaryMode.wdSummaryModeHighlight;

    this.ShowSummary = true;
    this.SummaryLength = 50;
}

.NET Framework 安全性

请参见

参考

DocumentBase 类

Microsoft.Office.Tools.Word 命名空间