Search in Word (.Doc) file
Hi
can anyone tell me how to search a keyword and copy the searched line from the word file and paste it the textbox.
i use this code to read the doc file but its showing me some junk character i think its the file information and path in junk that i dont want.
any option to resolve the problem
private void Button1_Click(object sender, System.EventArgs e)
{
StreamReader sr =new StreamReader("c:\\p.doc");
TextBox1.Text=sr.ReadToEnd();
sr.BaseStream.Flush();
sr.Close();
}
any help??
[558 byte] By [
kohlimannu] at [2007-11-19 14:11:05]

# 1 Re: Search in Word (.Doc) file
Take a look at Working with the Office XP Primary Interop Assemblies ( http://msdn.microsoft.com/library/en-us/dnoxpta/html/odc_oxppias.asp)
cilu at 2007-11-9 1:52:46 >

# 2 Re: Search in Word (.Doc) file
Take a look at Working with the Office XP Primary Interop Assemblies (http://msdn.microsoft.com/library/en-us/dnoxpta/html/odc_oxppias.asp)
i m creating a object of word application but its not working when i m typeing
application wp=new application()
but there is no application class or method found while typing wp=new .
ive include the Microsoft.Office.Interop.Word;
can anyone tell me why this is happening