首页 > 代码库 > 打开word

打开word

  Microsoft.Office.Interop.Word.Application appClass = new Microsoft.Office.Interop.Word.Application();
            appClass.Visible = true;

            Object missing = System.Reflection.Missing.Value;

            Microsoft.Office.Interop.Word.Document wordDoc = new Microsoft.Office.Interop.Word.Document();

            object fileName = path2;
            wordDoc = appClass.Documents.Open(ref fileName,
            ref missing, ref missing, ref missing, ref missing, ref missing,
            ref missing, ref missing, ref missing, ref missing, ref missing,
            ref missing, ref missing, ref missing, ref missing, ref missing);

打开word