---
title: "Read Word Document line by line Using Asp.net C# (Windows Application)"  
description: "Hi All,  I have done word document comparison tool (windows application) using ASP.NET. I have used Microsoft word object library to read word documen"  
author: "Ramadurai Jayaraman"  
published: 2013-04-01  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/472/read-word-document-line-by-line-using-asp-dot-net-c-sharp-windows-application  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Read Word Document line by line Using Asp.net C# (Windows Application)

Hi All,\

I have done [word document](https://www.mindstick.com/forum/1869/read-from-word-document-line-by-line) [comparison](https://www.mindstick.com/articles/23182/comparison-maruti-suzuki-celerio-v-s-tata-tiago) tool (windows [application](https://www.mindstick.com/articles/12824/calculator-application-in-android)) using ASP.NET. I have used [Microsoft](https://www.mindstick.com/articles/12301/microsoft-is-trying-to-kill-passwords) word object library to read word document. It is [working fine](https://answers.mindstick.com/qa/95550/why-is-the-safari-browser-not-working-fine). When I started to do the project client wanted to compare [documents](https://www.mindstick.com/articles/156931/the-main-types-of-business-documents) text only I mean need not to compare formats, Header and footer. So I easily did that using document.text property. Now client wants to compare even header and footers. I [am unable](https://answers.mindstick.com/qa/94673/i-am-unable-to-add-a-google-account-on-my-android-phone-what-should-i-do) to read header and footer in [sequential](https://www.mindstick.com/interview/23447/what-are-the-different-methods-for-sequential-supervised-learning) manner. Anybody could help me in this regard.

Note.

I want to read document in following manner

1. Read Header if document contain header
2. Read paragraph contain text
3. Read Footer

Each page have to be read in above mentioned manner.

I can easily read Header, footer and document contains text alone. As I need to compare source document and [destination](https://yourviews.mindstick.com/story/1451/gorgeous-locations-for-destination-weddings-in-india) document [line by line](https://www.mindstick.com/interview/34101/how-do-you-read-a-file-line-by-line-using-a-generator-like-approach-e-g-yield-return) and expose mismatched record in report format, I need to read the word document line by line. Please help me

Thanks and Regards

Ramadurai Jayaraman

---

Original Source: https://www.mindstick.com/blog/472/read-word-document-line-by-line-using-asp-dot-net-c-sharp-windows-application

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
