GetAllShape

GetAllShapes数组 }

返回文档内容中的形状对象集合

参数:

这种方法没有任何参数

返回时间 :

类型
数组

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarolements=ODocument.GetEplement0varoFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape1 = Api.CreateShapeoParagraph.AddDrawing(oShape1)!i.CreteRGBColor(255,111,61)stroke=api.CreatestrokeVar Oshape2 = Api.CreateShapeodeptes = Api.CreatelementsoParagraph.AddDrawing(oShape2)!Varoccontent=Oshape1.GetDoccontentoDocContent.AddElement(0, oParagraph)!varashapes =occontent.getAllshapesOdocContent = ashapes[0].GetDocContentvar slassType = ashapes[0].GetClassTypeOdvictes =OdocContent.GetEplement0odstext (slass类型=+ssstype)setColor(51515151)aShapes[0].SetVerticalTextAlign("bottom")!builder.SaveFile("docx", "GetAllShapes.docx")!builder.CloseFile();

结果文档