摘要:[.NET C# - 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 SaveAsWordDocument(strFileName)
09 {
10 this.m_wordSaveAsPath = strFileName;
11 //另存新檔
12 this.m_Document.SaveAs(ref this.m_wordSaveAsPath, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
13 }
14 }
02
03 public class WordHelper
04 {
05 private _Document m_Document = null;
06 private _Application m_wordApplication = null;
07
08 public void SaveAsWordDocument(strFileName)
09 {
10 this.m_wordSaveAsPath = strFileName;
11 //另存新檔
12 this.m_Document.SaveAs(ref this.m_wordSaveAsPath, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
13 }
14 }