Apache OpenOffice (AOO) Bugzilla – Issue 46025
Impossible to create new Calc doc by macro
Last modified: 2013-02-24 21:08:58 UTC
Here is a Basic macro to create a new Calc document. It works OK in OOo 1.1.3 but it systematically crashes 1.9m87 Sub testWriteDoc Dim myDoc As Object, adresseDoc As String, propFich(), myCell As Object adresseDoc = "private:factory/scalc" myDoc = StarDesktop.LoadComponentFromURL(adresseDoc, "_blank", 0, propFich) myCell = myDoc.Sheets(0).getCellRangeByName("A1") myCell.String = "Hello" adresseDoc = convertToURL("C:\Docs OpenOffice\tarata.ods") myDoc.storeAsURL(adresseDoc, propFich) myDoc.close(True) MsgBox("Document written") End Sub
works like a charm for me with 1.9m88
Works also for me now with 1.9m91