现在的位置: 首页 > 综合 > 正文

C#Winform 新建word

2012年08月17日 ⁄ 综合 ⁄ 共 438字 ⁄ 字号 评论关闭
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);
        }

抱歉!评论已关闭.