public void LoadWordChecked()
{
if (templateType.GetN_Name(T_id, 1) == "")
{
MessageBox.Show(" 操作失败,没有相应的模板!"); // 判断是否有word模板
return;
}
string P_path = Pathq + templateType.GetN_Name(T_id,1) + ".docx";//获取到模板路径
File.Copy(P_path, newfilename);//复制一个模板到另一个路径中,newfilename是另一个路径值
Object filename = newfilename;
Object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wordapp = new Microsoft.Office.Interop.Word.Application();// word对象
Microsoft.Office.Interop.Word.Document doc = new Document();//Document 对象
doc = wordapp.Documents.Open(ref filename, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
{
if (templateType.GetN_Name(T_id, 1) == "")
{
MessageBox.Show(" 操作失败,没有相应的模板!"); // 判断是否有word模板
return;
}
string P_path = Pathq + templateType.GetN_Name(T_id,1) + ".docx";//获取到模板路径
File.Copy(P_path, newfilename);//复制一个模板到另一个路径中,newfilename是另一个路径值
Object filename = newfilename;
Object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wordapp = new Microsoft.Office.Interop.Word.Application();// word对象
Microsoft.Office.Interop.Word.Document doc = new Document();//Document 对象
doc = wordapp.Documents.Open(ref filename, ref oMissing, ref oMissing, ref oMissing, ref oMissing,