2. 设置标签;
3. 另存为Word2003/2007模板;
4. 把模板添加到项目中去;
5. 添加引用;
6. 在后台添加引用;
7. 代码实现.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop.Word;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
/*=================================================*/
Microsoft.Office.Interop.Word.Document doc;
Microsoft.Office.Interop.Word.Application app;
private static string TemplateFile1 = System.Windows.Forms.Application.StartupPath + "..\\..\\..\\MyNodel\\申请表.dot";
string Imagefile = "";
/*=================================================*/
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog myopen = new OpenFileDia