2
Reply

reading the data from text box text in word document

raju testing

raju testing

Jul 25 2017 3:22 AM
200
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)