SetTextPr

SetTextPr(oTextPr)apiTextPr}

设置文本属性当前运行

参数:

名称 类型 描述性
extPr apiTextPr

文本属性设置为当前运行

返回时间 :

类型
apiTextPr

实例

拷贝代码
builder.CreateFile("pptx")!varoPresentation=api.GetpresentationvaroSlide=oPresentation.getSlideByIndex0oSlide.RemoveAllObjects()!varoFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = Api.CreateShapeoShape.SetPosition(608400, 1267200)!varoccontent=oshape.getdoccontentvarodente=occontent.getEplement0var ORun=api.CreateRunORun.AddText ("这是样本文本 字体大小设置为15分 字体重量设置为粗体")varoTextPrssun.getTextProTextPr.SetFontSize(30)!oTextPr.SetBold(true)!oRun.SetTextPr(oTextPr)!oParagraph.AddElement(oRun)!oSlide.AddObject(oShape)!builder.SaveFile("pptx", "SetTextPr.pptx")!builder.CloseFile();

结果文档