Creating Writer Document using Classic ASP
Posted: Tue Jun 30, 2009 11:17 am
Hi - I have to create an invoice in Writer using Classic ASP. I am new to OO and having installed OO on the server I tried to use the code snippet on the Automation Bridge Wiki page as follows:
But it just times out - can anyone point me in the right direction...
Many thanks...
Code: Select all
Set objServiceManager= Server.CreateObject("com.sun.star.ServiceManager")
Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")
Dim args()
Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
Set objText= objDocument.getText
Set objCursor= objText.createTextCursor
'Inserting some Text
objText.insertString objCursor, "The first line in the newly created text document." & vbLf, false
Many thanks...