#代码启动wordapp程序,如果内存中存在wordapp,则自动引用,而不用重新创建!
原文地址:http://www.codeproject.com/KB/cs/winwordloader.aspx
原文内容:
Introduction
In applications I develop, I often use Microsoft Word to generate various documents (reports, agendas, invoices, etc). The code to load and shut down the WinWord's COM server was always the same, so I wrote a simple helper class which manages this.
The Code
using System; using System.Threading; using System.Runtime.InteropServices; namespace AlexKay.Office { /// <summary> /// Helper class to manage the Word.Application coclass. /// </summary