NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.
MIT License
697 stars 143 forks source link

Is NetOffice supports multithreading? #393

Closed oleh-yashchyshyn-agiliway closed 4 months ago

oleh-yashchyshyn-agiliway commented 1 year ago

I am using NetOfficeFw.Word and I am wondering is NetOfficeFw.Word supports multithreading?

Because, as I know, Interop objects are not multithreading.

jozefizso commented 1 year ago

You must always access Word API from main thread to ensure correct behavior.

oleh-yashchyshyn-agiliway commented 1 year ago

@jozefizso I am using it in WPF application. Could you please suggest better approach then using Dispatcher in order to invoke on main thread?

jozefizso commented 1 year ago

@jozefizso I am using it in WPF application. Could you please suggest better approach then using Dispatcher in order to invoke on main thread?

You must use Dispatcher.

oleh-yashchyshyn-agiliway commented 1 year ago

@jozefizso Thank you