Code: Select all
Arr=new Array()
ServiceManager=new ActiveXObject('com.sun.star.ServiceManager')
Desktop=ServiceManager.createInstance('com.sun.star.frame.Desktop')
Document=Desktop.LoadComponentFromURL(RTFFile,'_blank',0,Arr)
As a usual windows programmer logically i would use variable "Document" as object with the method "Open":
Code: Select all
Arr=new Array()
ServiceManager=new ActiveXObject('com.sun.star.ServiceManager')
Desktop=ServiceManager.createInstance('com.sun.star.frame.Desktop')
Document=Desktop.LoadComponentFromURL('private:factory/scalc',_blank',0,Arr)
Document.Open(RTFFile)
It looks like simple task, can somebody help with a string of needed code, please?