本文实例为大家分享了C#生成Word文件的具体代码,供大家参考,具体内容如下
通过Microsoft.Office.Interop.Word生成Word文档
1.引用类 WordReport.cs,代码如下:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Interop.Word;
using MSWord = Microsoft.Office.Interop.
本文实例为大家分享了C#根据Word模版生成Word文的具体代码,供大家参考,具体内容如下
1、指定的word模版
2、生成word类
添加com Microsoft word 11.0 Object Library 引用
using System;
using System.Collections.Generic;
using System.Data;
using System.Windows.Forms;
using Word = Microsoft.Office.Interop.Wor