在对Word文档进行合并或者其他操作的时候,如果数据量比较少,没有异常;如果数据量加大,

偶尔会抛出标题的那种错误,错误原因分析以及解决方案如下:

 

错误原因分析:

Word会对文本进行拼写错误检查,如果错误过多或者有错误,可能会出现弹框,这种弹框在后台处理Word文档是致命的。

 

解决方案:

应该在打开Word文档的代码中添加阻止拼写验证和拼写弹框:如下

 _doc = Open(templateFileName);

_doc.SpellingChecked = false;  

_doc.ShowSpellingErrors = false;  

 

或者在服务器上对Word进行设置,步骤如下:

首先在服务器上打开一个word文档,在菜单栏上点击File,然后点击Options,如图:

 The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

 

接下来出现的对话框中点击左侧的Proffing如下图:

 The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

 

在右侧的When correcting spelling and grammar in Word 标题栏下,取消已选中的选项,如下图:

 The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

 

然后点击 OK,打完收工。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-08-04
  • 2022-12-23
猜你喜欢
  • 2021-08-15
  • 2021-05-23
  • 2021-05-23
  • 2021-12-22
  • 2022-12-23
  • 2021-11-02
  • 2022-01-25
相关资源
相似解决方案