private void Button2_Click(object sender, System.EventArgs e) { DateTime dated; dated = DateTime.Now; try { test = new CCWordApp(); test.Open(ConfigurationSettings.AppSettings["WordDoc"] + DocName.Text + ".doc"); test.GoToTheEnd(); test.SetAlignment("Right"); test.SetFont("nothing"); test.InsertText(dated.ToShortDateString()); test.InsertLineBreak(); test.InsertText(Text.Text); test.Save(); // Save in html format test.SaveAsHtml(ConfigurationSettings.AppSettings["WordDoc"] + DocName.Text + ".html"); test.Quit(); } catch (Exception exc) { StatusMessage.Text = exc.Message; StatusMessage.Visible = true; test.Quit(); } }