How to write into a .doc (Word) file in c#?

private void MakeDoc(object fileMain, string number)
{
Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

object nullobj = System.Reflection.Missing.Value;

WordApp.Visible = false;

Microsoft.Office.Interop.Word.Document doc = WordApp.Documents.Open(
ref fileMain, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj);

doc.Activate();

FindAndReplace(WordApp, "", number);

object fileOutput = Directory.GetCurrentDirectory() + @"\K.doc";
doc.SaveAs(ref fileOutput, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj);

doc.Close(ref nullobj, ref nullobj, ref nullobj);
WordApp.Quit(ref nullobj, ref nullobj, ref nullobj);

Functions.OpenFile(fileOutput.ToString());
}

private void FindAndReplace(Microsoft.Office.Interop.Word.Application WordApp, object findText, object replaceWithText)
{
object matchCase = true;
object matchWholeWord = true;
object matchWildCards = false;
object matchSoundsLike = false;
object nMatchAllWordForms = false;
object forward = true;
object format = false;
object matchKashida = false;
object matchDiacritics = false;
object matchAlefHamza = false;
object matchControl = false;
object read_only = false;
object visible = true;
object replace = 2;
object wrap = 1;

WordApp.Selection.Find.Execute(ref findText,
ref matchCase, ref matchWholeWord, ref matchWildCards,
ref matchSoundsLike, ref nMatchAllWordForms, ref forward,
ref wrap, ref format, ref replaceWithText, ref replace,
ref matchKashida, ref matchDiacritics, ref matchAlefHamza,
ref matchControl);
}