OOobbs2/9
質問
http://oooug.jp/faq/index.php?cmd=read&page=faq%2F3%2F65&word=Basic Math のドキュメントを新規作成して、Standard ライブラリの Module1 に Sub Main Dim oDoc As Object oDoc = ThisComponent oDoc.Formula = "sum x" msgbox oDoc.Formula End Sub ちゃんと動きますね。 数式以外に、数式の見た目を変更するプロパティしかない。もとからシンプルな機能しかないし、Formula プロパティがすべてだから仕方ないらしい。 まとめのページ2ページくらいで終わりそう。 Writer ドキュメントに挿入するときの例 Sub Main Dim oDoc As Object, oTextCursor As Object, oText As Object Dim oFormula As Object oDoc = ThisComponent oText = oDoc.getText() oTextCursor = oText.createTextCursor() oFormula = oDoc.createInstance("com.sun.star.text.TextEmbeddedObject") oFormula.CLSID = "078b7aba-54fc-457f-8551-6147e776a997" oFormula.AnchorType = com.sun.star.text.TextContentAnchorType.AS_CHARACTER oText.insertTextContent(oTextCursor, oFormula, true) oFormula.EmbeddedObject.Formula = "sum x" End Sub 回答
感想,コメント,メモ
|