集封

设置Fill(oapiFill)apiTextPr}

设置文本颜色当前文本运行

参数:

名称 类型 描述性
OAPIFILLLL apiFill

颜色或模式填充文本颜色

返回时间 :

类型
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 ("这只是样本文本)oParagraph.AddElement(oRun)!ORun=Api.CreateRuni.CreateSolidFilloRun.SetFill(oFill)!ORun.AddText ("这是用字体颜色设置为黑的文本运行.")oParagraph.AddElement(oRun)!oSlide.AddObject(oShape)!builder.SaveFile("pptx", "SetFill.pptx")!builder.CloseFile();

结果文档