Save doc

//OBJECT OF MISSING "NULL VALUE"

Object oMissing = System.Reflection.Missing.Value;

//OBJECTS OF FALSE AND TRUE

Object oTrue = true;

Object oFalse = false;

       

//CREATING OBJECTS OF WORD AND DOCUMENT

Word.Application oWord = new Word.Application();

Word.Document oWordDoc = new Word.Document();

//MAKING THE APPLICATION VISIBLE

oWord.Visible = true;

       

//ADDING A NEW DOCUMENT TO THE APPLICATION

oWordDoc = oWord.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);

----------------

Object oSaveAsFile = (Object)"C:\\SampleDoc.doc";

oWordDoc.SaveAs(ref oSaveAsFile, 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);

原文地址:https://www.cnblogs.com/greencolor/p/1642672.html