请问如何将数据库的一条记录放到一个已经做好的WORD模板文件的表格中去我的表格是3行2列,左边分别是姓名,学历,专业,右面需要填写数据。
下面是我的代码不知错在那里,该怎么写:
object Missing = System.Reflection.Missing.Value;
Word.ApplicationClass oWordApp = new 
Word.ApplicationClass();
Word.Document oWordDoc;
object oTemplate = @"c:\\姓名.dot";
oWordDoc = oWordApp.Documents.Add(ref oTemplate,ref Missing,ref Missing, ref Missing);
oWordDoc.Tables.Item(0).Cell(1,2).Range.Text = "张宁";
            oWordDoc.Tables.Item(0).Cell(2,2).Range.Text = "大专";
            oWordDoc.Tables.Item(0).Cell(3,2).Range.Text = "计算机";