the*_*row 8 c# ms-word com-interop
我得到这个堆栈跟踪:
System.Runtime.InteropServices.COMException (0x800A13E9): Word ðú÷ì ááòéä.
at Microsoft.Office.Interop.Word.Documents.Add(Object& Template, Object& NewTemplate, Object& DocumentType, Object& Visible)
at Crm.DocumentGeneration.Printing.DocumentsPrinter.MergeDocuments(ApplicationClass& wordApp, IEnumerable`1 printDataItems, String tempDirectory, String template) in C:\Work\Danel.Nursing\Crm.DocumentGeneration.Printing\DocumentsPrinter.cs:line 249
Run Code Online (Sandbox Code Playgroud)
谷歌搜索后似乎COMException(0x800A13E9)是内存不足异常,但服务器上有足够的内存来启动太空船 8192太空飞船.
这是函数调用:
Document document = wordApp.Documents.Add(ref defaultTemplate, ref missing, ref missing, ref missing);
Run Code Online (Sandbox Code Playgroud)
我检查过defaultTemplate没有null或无效.
这是我找到的解决方案:
在那之后,开始祈祷.如果通过终端服务器访问它不起作用.这对我来说是个问题嘿嘿.
编辑:终端服务器的问题是只允许管理员引发COM对象,所以你要做的就是冒充管理员.
| 归档时间: |
|
| 查看次数: |
9641 次 |
| 最近记录: |