使用C#将html文本插入.odt OpenOffice文档

时间:2013-01-17 17:08:56

标签: c# openoffice-writer uno

请帮助在C#中使用OpenOffice Writer文档的任何人。如何在文档中插入HTML格式化文本?以下代码:

((unoidl.com.sun.star.text.XTextDocument)xComponent).getText().getStart().
    setString("The <b>first line </b> in the newly created text document.\n\n");  

准确插入The <b>first line </b> in the newly created text document.

我需要在新创建的文本文档中插入“第一行

任何解决方案?

1 个答案:

答案 0 :(得分:0)

如果要插入格式化文本,则需要更改(段落/字符)属性。

如您所见,OOo对HTML标签没有反应; - )

相关问题