Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to use ICROleObject to run SetOleLocation

I am trying to located what library ICROleObject is found in. I want to use SetOleLocation to send a Word Document or an Excel Spreadsheet to a report section.

I have found an example on Business Objects DevLibrary:

cOLEObj.SetOleLocation App.Path & "\res\SampleExcel1.xls"
cOLEObj.Height = 1800
cOLEObj.Width = 5791

But I cannot find any information on how to declare or use the cOLEObj

After googling, I found that it should be declared as ICROleObject

I cannot find this Interface in any of the libraries. I cannot find any documentation how to use this.

Can anyone please give me an example or point me where to find how to add a OLE Object into a Report.

This must be done in .Net, not in the designer. I am dynamically adding sections and objects into this report,

so it must be dynamically added into a section.

To add a picture, I am using this and it works great, but I also need to be able to add Word Docs and PDF's into a report

boPictureObject = boReportClientDocument.ReportDefController.ReportObjectController.ImportPicture( _
strImportFileName, boSection, 1, 1)

Thank you,


Former Member
Not what you were looking for? View more on this topic or Ask a question