C#在Winform中怎样打开 word文档
这是我做的:
Word.ApplicationClass wd = new Word.ApplicationClass();
Word.Document docu = null;
object missing = System.Reflection.Missing.Value;
object FileName =@ "e:\abc.doc ";
object readOnly = true ;
object isVisible = false;
object index = 0;
docu = wd.Documents.Open(ref FileName, ref missing, ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref isVisible, ref missing,
ref missing, ref missing, ref missing);
------解决方案--------------------http://community.csdn.net/Expert/TopicView3.asp?id=5427715
中有
------解决方案--------------------private void toolStripMenuItem17_Click(object sender, EventArgs e)
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.FileName = @ "C:\Program Files\Microsoft Office\OFFICE11\WinWord.EXE ";
proc.StartInfo.Arguments = @ "D:\我的XXX.doc ";
proc.Start();
}