DocumentBase.SetLetterContent(Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public void SetLetterContent (ref object letterContent);
参数
- letterContent
- Object
示例
下面的代码示例创建一个新的表样式,并使用方法将其添加到附加到文档的模板 SetDefaultTableStyle 。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。
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);
}
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