apiOleObject

新建apiOleObject

类表示Ole对象

方法论

名称 描述性
GetApplicationId

返回当前OLE对象应用标识

GetClassType系统

返回ApiOleObject类

GetData

返回当前OLE对象的字符串数据

SetApplicationId

设置当前OLE对象应用标识

SetData系统

将数据设置为当前OLE对象

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvar 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}")!varolements=ODocument.GetEplement0oParagraph.AddDrawing(oOleObject)!oOleObject.SetApplicationId("asc.{E5773A43-F9B3-4E81-81D9-CE0A132470E7}")!var sAppId=OleObject.GetAppliationIdodeptes = Api.Createlementsodision.AddTextoDocument.Push(oParagraph)!oOleObject.SetData("https://youtu.be/eJxpkjQG6Ew")!var sData=OleObject.GetDataodeptes = Api.Createlementsod.adText (“OLE对象数据:+sData”)oDocument.Push(oParagraph)!varstype=OleObject.GetClassTypeodeptes = Api.CreatelementsoddText (Class类型:+sype)oDocument.Push(oParagraph)!builder.SaveFile("docx", "ApiOleObject.docx")!builder.CloseFile();

结果文档