我正在使用 Interop word ApplicationClass.Documents.Open 方法打开一个 word 文档。在我的应用程序中,当我使用以下语句时,它会挂起: IE 显示它仍在加载,但它从不做任何事情。
_Document aDoc = WordApp.Documents.Open(
ref fileName, ref oMissing, ref readOnly, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref isVisible, ref oMissing, ref oMissing, ref oMissing,
ref oMissing);
我通过创建一个虚拟网站尝试了同样的事情,并且成功了。问题是它只是没有在我的应用程序中打开 word 文档。这段代码有什么问题,还是我需要添加更多内容?
我还看到了一个创建和执行的线程,但不知道它的起源。