摘要:[.NET C# - Word]關閉Word
01 
using Microsoft.Office.Interop.Word;
02
03
public class WordHelper
04
{
05
private _Document m_Document = null;
06
private _Application m_wordApplication = null;
07
08
public void CloseWordDocument()
09
{
10
object oSaveChanges = WdSaveOptions.wdSaveChanges;
11
this.m_Document.Close(ref oSaveChanges, ref oMissing, ref oMissing);
12
this.m_wordApplication.Quit(ref oSaveChanges, ref oMissing, ref oMissing);
13
}
14
}


02

03

04

05

06

07

08

09

10

11

12

13

14
