看起来很简单,调了2个小时没成,希望高手不吝赐教,不胜感激。using System;
using Word;
using System.Reflection;namespace wordtest
{
class Class1
{[STAThread]
static void Main(string[] args)
{Word._Application oWord;
object oMissing = System.Reflection.Missing.Value;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
object p4=true;
oDoc=oWord.Documents.Add(ref oMissing, ref oMissing,ref oMissing,ref p4);//*****
}
}
}运行之后*那行总是变黄,然后出现对话框:
未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 wordtest.exe 中。
其他信息: 服务器出现意外情况。
using Word;
using System.Reflection;namespace wordtest
{
class Class1
{[STAThread]
static void Main(string[] args)
{Word._Application oWord;
object oMissing = System.Reflection.Missing.Value;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
object p4=true;
oDoc=oWord.Documents.Add(ref oMissing, ref oMissing,ref oMissing,ref p4);//*****
}
}
}运行之后*那行总是变黄,然后出现对话框:
未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 wordtest.exe 中。
其他信息: 服务器出现意外情况。
网上的各种版本好像都不行,我用的是VC#2003和word2002,是不是应该重装操作系统或者重装word啊?
总是出现下述对话框:
上次打开文档“Normal.dot”时出现严重错误。您可以继续打开它,或单击“恢复数据”进行数据恢复......然后出现3个按钮,打开,恢复数据,取消。按任何一个都出现:服务器出现意外情况...:(立刻重装系统,过会儿有问题再问大家吧。