Dear shrivastava,
private void button1_Click(object sender, EventArgs e)
{
object missing = System.Reflection.Missing.Value;
object Visible=true;
object start1 = 0;
object end1 = 0;
ApplicationClass WordApp = new ApplicationClass();
Document adoc = WordApp.Documents.Add(ref missing, ref missing, ref missing, ref missing);
Range rng = adoc.Range(ref start1, ref missing);
try
{
rng.Font.Name = "Georgia";
rng.InsertAfter("Hello World!");
object filename = @"D:\MyWord.doc";
adoc.SaveAs(ref filename, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
WordApp.Visible = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
For better understanding check this link
http://nishantrana.wordpress.com/2007/11/03/creating-word-document-using-c/[
^]
More about it
Microsoft Word Documents from ASP.NET[
^]
File Save(Check this link for better understanding)
http://www.c-sharpcorner.com/uploadfile/mahesh/savefiledialog-in-C-Sharp/[
^]
Thanks