相关疑难解决方法(0)

关闭Word文档时出错:"消息过滤器指示应用程序正忙."

我正在使用Microsoft Interop将Word Doc保存为HTML文件,当我尝试关闭文档时出现此错误:

消息过滤器指示应用程序正忙.(来自HRESULT的异常:0x8001010A(RPC_E_SERVERCALL_RETRYLATER))

这是我的代码:

// word interop setting
object visible = true;
object readOnly = true;
object missing = Type.Missing;
object saveChanges = true;
object htmlFile = (object)Server.MapPath(@"worddoc.html");
object fileType = 
  (object)Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatFilteredHTML;       

// open document
Microsoft.Office.Interop.Word.Application wordApp =
  new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word.Document wordDoc =
  wordApp.Documents.Open(ref url, ref missing, ref readOnly, ref missing,
       ref missing, ref missing, ref missing, ref missing, ref missing,
       ref missing, ref  missing, ref  visible, ref missing, ref missing,
       ref missing, ref missing);

try
{                           
    // save …
Run Code Online (Sandbox Code Playgroud)

c# asp.net com-interop

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×1

c# ×1

com-interop ×1