Forums - C# Corner

Forum guidelines
raju testing

raju testing

  • 1.5k
  • 1
  • 100

reading the data from text box text in word document

Jul 25 2017 3:22 AM
Reading the data from text box text in word document. textbox text is not read from word document but dropdown values is read.
 
 
Word.Application app = new Word.Application();
Word.Document doc;
object missing = System.Type.Missing;
doc = app.Documents.Open(ref path,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing);
String read = string.Empty;
List data = new List();
for (int i = 0; i < doc.Paragraphs.Count; i++)
{
string temp = doc.Paragraphs[i + 1].Range.Text.Trim();
if (temp != string.Empty)
data.Add(temp);
}

Answers (2)