本文為機器翻譯文章。如需檢視英文版,請選取 [原文] 核取方塊。您也可以將滑鼠指標移到文字上,即可在快顯視窗顯示英文原文。
譯文
原文

DocumentBase.SetLetterContent 方法 (Object)

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

public void SetLetterContent(
	ref object letterContent
)

參數

letterContent
Type: System.Object

The following code example creates a new table style and adds it to the template attached to the document by using the M:Microsoft.Office.Tools.Word.DocumentBase.SetDefaultTableStyle(System.Object@,System.Boolean) method. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentSetDefaultTableStyle()
{
    // Create a new table style.
    object tableStyle = Word.WdStyleType.wdStyleTypeTable;
    Word.Style newStyle = this.Styles.Add("TableStyle1", 
        ref tableStyle);

    // Set a property of the new style.
    newStyle.Font.Color = Word.WdColor.wdColorBlueGray;

    // Set this style as the default for tables in the document.
    object inputStyle = newStyle;
    this.SetDefaultTableStyle(ref inputStyle, true);
}
回到頁首
顯示: