Create isolated Interop.Word instance

纵然是瞬间 提交于 2019-12-13 04:25:23

问题


I need to create documents in background via Interop.Word. When I get new instance of _Application, it creates new WINWORD process with svchost.exe process as parent and sets Window visibility to Hidden. But when I open Word document manually, it opens in a process created by App, but not in a new process. Also it makes hidden Word app with all opened documents in background earlier visible.

Is it possible to deny Word app created by me in code to use documents opened\created by user manually and create new WINWORD process with explorer.exe process as parent instead of using an existing one?

UPD:

Workaround: http://support.microsoft.com/kb/188546


回答1:


Workaround in the link above creates new WINWORD process for the documents opened manually: http://support.microsoft.com/kb/188546



来源:https://stackoverflow.com/questions/20745668/create-isolated-interop-word-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!