GetAllOleObjects

GetAllOleObjects数组 }

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

参数:

这种方法没有任何参数

返回时间 :

类型
数组

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarolements=ODocument.GetEplement0varoFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = Api.CreateShapeoParagraph.AddDrawing(oShape)!var oOleObject = Api.CreateOleObject("https://i.ytimg.com/vi_webp/SKGz4pmnpgY/sddefault.webp", 95 * 36000, 70 * 36000, "https://youtu.be/SKGz4pmnpgY", "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}")!odeptes = Api.CreatelementsoParagraph.AddDrawing(oOleObject)!varoccontent=oshape.getdoccontentoDocContent.AddElement(0, oParagraph)!var aleObjects=occontent.getAllOleObjectsvar sAppId=aleObjects[0].GetApplicationIdodeptes = Api.Createlementsodision.AddTextoDocument.Push(oParagraph)!builder.SaveFile("docx", "GetAllOleObjects.docx")!builder.CloseFile();

结果文档