类表示OLE对象
名称 | 描述性 |
GetApplicationId | 返回当前OLE对象应用标识 |
GetClassType系统 | 返回ApiOleObject类 |
GetData | 返回当前OLE对象的字符串数据 |
SetApplicationId | 设置当前OLE对象应用标识 |
SetData系统 | 将数据设置为当前OLE对象 |
builder.CreateFile("pptx")!varoPresentation=api.GetpresentationvaroSlide=oPresentation.getSlideByIndex0oSlide.RemoveAllObjects()!var oOleObject = Api.CreateOleObject("https://api.onlyoffice.com/content/img/docbuilder/examples/ole-object-image.png", 130 * 36000, 90 * 36000, "https://youtu.be/SKGz4pmnpgY", "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}")!OleObject.SetSizeOleObject.SetPostition(70*36000,10*3600)oSlide.AddObject(oOleObject)!oOleObject.SetApplicationId("asc.{E5773A43-F9B3-4E81-81D9-CE0A132470E7}")!oOleObject.SetData("https://youtu.be/eJxpkjQG6Ew")!var sAppId=OleObject.GetAppliationIdvar sData=OleObject.GetDatavarstype=OleObject.GetClassTypeVar OGs1 = Api.CreateGradientStopVar OGS2 = Api.CreateGradient StopVaroFinll=Api.CreateLinearGradientFillvarostroke=api.CreatestrokeVar ODrawing=api.CreateShapeODrawing.SetPostition(20*36000,150*3600)varoccontent=odrawing.etcontentvarodente=occontent.getEplement0odision.AddTextodeptes = Api.Createlementsod.adText (“OLE对象数据:+sData”)oDocContent.Push(oParagraph)!odeptes = Api.CreatelementsoddText (Class类型:+sype)oDocContent.Push(oParagraph)!oSlide.AddObject(oDrawing)!builder.SaveFile("pptx", "ApiOleObject.pptx")!builder.CloseFile();