次の方法で共有


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 名前空間