添加对象

添加Object(oDrawing)+++

向当前幻灯片布局添加对象(图像、形状或图表)。

参数:

名称 类型 描述性
ODrawing spiDrawing

对象添加到当前幻灯片布局

返回时间 :

类型
布林安

实例

拷贝代码
builder.CreateFile("pptx")!varoPresentation=api.GetpresentationvaroSlide=oPresentation.getSlideByIndex0oSlide.RemoveAllObjects()!varomasterssservations.GetMasters0VaroLayotsevaroFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = Api.CreateShapeoShape.SetPosition(608400, 1267200)!Shape.SetSize(300*36000,130*3600)oLayout.AddObject(oShape)!varoccontent=oshape.getdoccontentvarodente=occontent.getEplement0oParagraph.SetJc("left")!odtext ("此形状添加到当前布局中")builder.SaveFile("pptx", "AddObject.pptx")!builder.CloseFile();

结果文档