【问题标题】:Multithreading with Word automation多线程与 Word 自动化
【发布时间】:2013-09-21 23:42:19
【问题描述】:

我正在使用 PIA 在 VB.NET 中使用 MS Word 2007。

具体来说,我正在对内存中的多个 Word.Document 对象进行一些处理,这些对象是同一个 Word.Application 对象的一部分。我可以在单独的线程中处理每个 Word.Document,还是 Word 自动化需要一个线程?

谢谢,

雅各布

【问题讨论】:

标签: .net multithreading ms-word office-pia


【解决方案1】:

Multithreaded Programming with Visual Basic .NETInterlocked Class 让您安全地递增、递减、交换和比较来自任何线程的值。 另见Writing Code in Office SolutionsHow to: Target Office Applications Through Primary Interop Assemblies

【讨论】:

  • 投了反对票,没有评论!谁能解释为什么这不是一个好主意?
  • 您的回答没有回答“我可以在单独的线程中处理每个 Word.Document 还是 Word 自动化需要单个线程?”
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多