简体   繁体   中英

C# interop automation while user interacts with separate Word instance

有没有一种方法可以在后台运行C#互操作命令,这些命令在处理单独的Word文档时不会干扰用户?

All calls to the Office (for example, in Outlook) object model and PIA execute on Outlook's main foreground thread. The only threading model that the Office/Outlook/Word object model supports is single-threaded apartment (STA). Calling the Office/Outlook/Word object model or PIA from a background thread is not supported and can lead to errors and unexpected results in your solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM