Dear All,
Am new in development section and need to show the word file in VS2008 and how m able to shoe the word file i have used the following code plz provide me the needfull
using Word = Microsoft.Office.Interop.Word;
.
.
public partial class SE_SEIT_PSOOP_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
object missing = System.Reflection.Missing.Value;
object readOnly = false;
object isVisible = true;
object fileName = "~/SE/SEIT/DSF/E-notes/UNIT I I.docx";
Microsoft.Office.Interop.Word.ApplicationClass applicationWord = new Microsoft.Office.Interop.Word.ApplicationClass();
Microsoft.Office.Interop.Word.Document modelloBusta = new Microsoft.Office.Interop.Word.Document();
try
{
modelloBusta = applicationWord.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, ref missing, ref missing, ref missing, ref missing);
modelloBusta.Activate();
}
catch (Exception eccezione)
{
Console.Write(eccezione);
modelloBusta.Application.Quit(ref missing, ref missing, ref missing);
}
}
}