SetTextPr

setTextPr(oTextPr)+++

文本设置应用到表全部内容

参数:

名称 类型 描述性
extPr apiTextPr

文本属性设置为当前表

返回时间 :

类型
布林安

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvar表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!varo表=api.Criate表(3,3)oTable.SetWidth("percent", 100)!oTable.SetStyle(oTableStyle)!oTable.GetCell(0, 0).GetContent().GetElement(0).AddText("Cell 1")!oTable.GetCell(0, 1).GetContent().GetElement(0).AddText("Cell 2")!oTable.GetCell(0, 2).GetContent().GetElement(0).AddText("Cell 3")!oDocument.Push(oTable)!varoTextPr=api.CreateTextProTextPr.SetFontSize(30)!oTextPr.SetBold(true)!oTable.SetTextPr(oTextPr)!builder.SaveFile("docx", "SetTextPr.docx")!builder.CloseFile();

结果文档