C#Winform 新建word

private void NewWord_Click(object sender, EventArgs e)
        {
            object oMissing = System.Reflection.Missing.Value;
            Microsoft.Office.Interop.Word.Application wApp = new Microsoft.Office.Interop.Word.Application();
            wApp.Visible = true;
            Microsoft.Office.Interop.Word.Document wDoc = new Microsoft.Office.Interop.Word.DocumentClass();
            wApp.Documents.Add(ref oMissing,ref oMissing,ref oMissing,ref oMissing);
        }

你可能感兴趣的:(WinForm)