DocumentBase.SetLetterContent Method (Object)

 
Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public void SetLetterContent(
	ref object letterContent
)

Parameters

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 SetDefaultTableStyle 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);
}
Return to top
Show: