本文介绍了从Asp.net.C#打开Word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Asp.net打开Word文档

我使用了以下代码

I am trying to open a word document from Asp.net

i used the following code

object fileName = strFileName;
            object readOnly = false;
            object isVisible = true;
            object missing = System.Reflection.Missing.Value;
            oWordApplic.Visible = true;
            oDoc = oWordApplic.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);
            oDoc.Activate();



我现在的问题是一切都挂起了.我可以看到WORD.exe在ASPNET用户(通过任务管理器)中处于活动状态,但是绝对没有任何反应. Web进程可能会经历25%的过程,然后才挂起.


并且,如果我们通过任务管理器停止WORD.exe,则它将显示远程过程调用失败错误消息"

请帮助我,



My issue now is that everything just hangs. I can see that WORD.exe is active with the ASPNET user(By task manager), but absolutely nothing happens; the web process maybe goes 25% of the way through and then just hangs.


And if we stops the WORD.exe via task manager,then it will show "Remote Procedure Call Failed error message"

Please help me,

推荐答案




这篇关于从Asp.net.C#打开Word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 08:30