Share via


DocumentBase.SetLetterContent 메서드

네임스페이스:  Microsoft.Office.Tools.Word
어셈블리:  Microsoft.Office.Tools.Word.v4.0.Utilities(Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

구문

‘선언
Public Sub SetLetterContent ( _
    ByRef letterContent As Object _
)
public void SetLetterContent(
    ref Object letterContent
)

매개 변수

예제

다음 코드 예제에서는 새 테이블 스타일을 만든 다음 SetDefaultTableStyle 메서드를 사용하여 문서에 첨부된 템플릿에 이를 추가합니다. 이 예제를 사용하려면 문서 수준 프로젝트 ThisDocument 클래스에서 실행하십시오.

Private Sub DocumentSetDefaultTableStyle()
    ' Create a new table style.
    Dim newStyle As Word.Style = Me.Styles.Add("TableStyle1", _
        Word.WdStyleType.wdStyleTypeTable)

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

    ' Set this style as the default for tables in the document.
    Dim inputStyle As Object = newStyle
    Me.SetDefaultTableStyle(inputStyle, True)
End Sub
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);
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DocumentBase 클래스

Microsoft.Office.Tools.Word 네임스페이스