try { string filepath= Server.MapPath("~/Uploadhtml/Functions Report23082012_130108.doc"); Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass(); object fileName = filepath; object readOnly = false; object isVisible = true; object missing = System.Reflection.Missing.Value; WordApp.Visible = true; Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible); aDoc.Activate(); } catch(Exception e) { string script = "alert('Html error found.');"; System.Web.UI.ScriptManager.RegisterClientScriptBlock(Button3, this.GetType(), "Test", script, true); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)