private void Button2_Click(object sender, System.EventArgs e) { try { test = new CCWordApp(); //test.Open (ConfigurationSettings.AppSettings["WordMod"] + "normal.dot"); test.Open(); test.SetFontName("Arial"); test.SetFontSize(14); test.SetAlignment("Center"); test.SetFont("Bold"); test.InsertText(DocName.Text + ".doc"); test.SetFont("nothing"); test.SetAlignment("Left"); test.InsertLineBreak(5); test.SetFontSize(8); test.InsertText(Text.Text); test.SaveAs(ConfigurationSettings.AppSettings["WordDoc"] + DocName.Text + ".doc"); // 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(); } }