200求--把RTF文档转换为HTML文档的.net/com组件或c#代码。

Godshow 2003-08-05 09:40:13
如果是使用word组件的,代码给出也可,多谢。
...全文
21 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinchy 2003-08-05
  • 打赏
  • 举报
回复
vb.net
http://www2.bitstream.net/~bradyh/downloads/rtf2htmlrm.html
panyee 2003-08-05
  • 打赏
  • 举报
回复
添加引用Microsoft Word 10 Object Library.dll

Word.Application app = new Word.ApplicationClass();
app.Visible = false;
string strFile = "c:\\bbb.rtf";
object obj = System.Reflection.Missing.Value;
//Object obj = null;
Object infile = (object)strFile;
Word.Document doc = app.Documents.Open(ref infile, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj);

string strnew = "c:\\bbb.htm";
Object outfile = (object)strnew;
Object fmt = (object)Word.WdSaveFormat.wdFormatHTML;
doc.SaveAs(ref outfile, ref fmt, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj);
doc.Close(ref obj, ref obj, ref obj);
doc = null;
app = null;
Napoleo 2003-08-05
  • 打赏
  • 举报
回复
思路:
调用IE或者Word打开*.rtf,然后saveas html文档
Godshow 2003-08-05
  • 打赏
  • 举报
回复
200分怎么没人要啊?

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧