Я получаю эту трассировку стека:
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
После небольшого приближения кажется, что COMException (0x800A13E9) не хватает памяти, но на сервере достаточно памяти для запуска космического корабля 8192 космических кораблей.
Вот вызов функции:
Document document = wordApp.Documents.Add(ref defaultTemplate, ref missing, ref missing, ref missing);
Ничто не является нулевым или недействительным с defaultTemplate, я проверил.