I am reading word document in C# (3.5) using Microsoft.Office.Interop.Word. Reading line by line, splitting line into array[] and processing every word of line and based on some business logic replacing some words and after the replacement of words, replacing the complete line with converted line.
Till now Every thing is working fine.
Now i have some word documents, those are having paragraph and tables. I want to read every Column of the table one by one and replace the content of the column in particular column.
Update
Using Office Automation
1. Opening word file.
2. Moving cursor to top of the document
3. Selecting first line using (`wordApp.Selection.endKey`) and processing all words
4. After processing the words replacing the selected line with the processed line.
5. Using wordApp.Selection.MoveDown(ref lineCount, ref countPage, ref MISSING);
moving next line processed further.
Problem:
1. When reading table it reads only first column when using wordApp.Selection.endKey
I want to process all column’s data.
Is there any way to identify whether content is paragraph or table?

I found a workaround for the same.
Approach is listed below.
1. Open the Word Document using
WordApp.Documents.Open()2. Using
Selection.MoveDownto traverse the Document line by line3. Skipping the content of the Table’s Cells
4. At last processing only Tables of the document