Display the Content of Word File in Browser
We do most of the our Document related activities using Microsoft Office.. Most of the time we need to export the details from these files and display it our browsers. Most of them are related to excel file like importing excel to database or importing the excel content to gridview. Today I will be showing how to display the content of Word File(*.doc) to be rendered in your browser using ASP.Net.
First of all you need to reference this Microsoft.Office.Interop.Word to your Web Application.
Then include the namespace:
Then on the Page_Load Event write the following code:[Here I am using a word file named demo.docx which is in the folder WordFile inside my Web Application's Root Folder.]