using MSWord = Microsoft.Office.Interop.Word;object dotpath = System.Windows.Forms.Application.StartupPath + "\\doc\\Template\\designtable.dot";MSWord.Application wordApp = new MSWord.Application();
MSWord.Document wordDoc = wordApp.Documents.Add(ref dotpath, ref Nothing, ref Nothing, ref Nothing);在DEBUG模式下
无论是据对路径与相对路径都不会报错在Release模式下
用相对路径,就没办法生成Word文档当然,我要生成相对路径的文档新手诚心求教