google it  aspose.words...

解决方案 »

  1.   

    这个容易,使用docx开源组件轻松搞定,可以看一下这个源码,里面有各种对word的操作,包括插入图片,对齐方式,字号颜色超链接等等,都有很详细的demo。源码和示例都可以在这里下载:
    http://www.hellocsharp.com/code/16.aspx
      

  2.   

    正好我们公司也用到这将数据填写到word 然后导出的功能! 。 你可以将数据写入rtf文档然后再  保存为 doc文档
      

  3.   

    创建word文档
    private void btn_New_Click(object sender, EventArgs e)
            {
                btn_New.Enabled = false;//将新建按钮设置为不可用
                ThreadPool.QueueUserWorkItem(//开始线程池
                    (pp) =>//使用lambda表达式
                    {
                        G_wa = new Microsoft.Office.Interop.Word.Application();//创建应用程序对象
                        object P_obj = "Normal.dot";//定义文档模板
                        Word.Document P_wd = G_wa.Documents.Add(//向Word应用程序中添加文档
                            ref P_obj, ref G_missing, ref G_missing, ref G_missing);
                        G_str_path = string.Format(//计算文件保存路径
                            @"{0}\{1}", G_FolderBrowserDialog.SelectedPath,
                            DateTime.Now.ToString("yyyy年M月d日h时s分m秒fff毫秒") + ".doc");
                        P_wd.SaveAs(//保存Word文件
                            ref G_str_path,
                            ref G_missing, ref G_missing, ref G_missing, ref G_missing,
                            ref G_missing, ref G_missing, ref G_missing, ref G_missing,
                            ref G_missing, ref G_missing, ref G_missing, ref G_missing,
                            ref G_missing, ref G_missing, ref G_missing);
                        ((Word._Application)G_wa.Application).Quit(//退出应用程序
                            ref G_missing, ref G_missing, ref G_missing);
                        this.Invoke(//调用窗体线程
                            (MethodInvoker)(() =>//使用lambda表达式
                            {
                                MessageBox.Show(//提示已经创建Word
                                    "成功创建Word文档!", "提示!");
                                btn_display.Enabled = true;//启用显示按钮
                            }));
                    });
            }