TechTalkz.com Logo Ask the Experts!

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Software World > Programming

C# code using Word Interop to display line numbers of text being searched

Programming

 
Reply
Thread Tools Display Modes
Unread 12-05-2014, 08:59 AM   #1
Newbie
Thread Starter
 
Join Date: May 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 risk_sly is an unknown quantity at this point

Intel Nvidia

Windows 7


C# code using Word Interop to display line numbers of text being searched

Hi,

Can anybody show a sample code to display the line number of a text in a MS Word document (using Word Interop)? For example, I have a document Sample.docx saved in C:\. I would like to search for the word "Everest" in the document. The program should return the line numbers that contain the word "Everest" say, in a listbox. i.e. the listbox would contain all line numbers that contain the word "Everest". Many thanks in advance.

Sponsored Links

Last edited by risk_sly; 12-05-2014 at 09:02 AM.. Reason: incomplete details
risk_sly is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get text in a legal document to line up with line numbers sunshine97236 Microsoft Office Word 1 14-02-2008 09:12 PM
Finding / highlighting searched for text in the preview pane me Windows Vista All 1 24-01-2008 02:10 AM
how do I copy text with line numbers? NoelC Microsoft Office Word 1 05-11-2007 04:02 PM
line numbers outside of text box jackievar Microsoft Office 1 11-10-2007 01:02 PM
Display multi line text as one item in a listbox ashwath C#(C Sharp) 2 17-09-2007 07:06 PM


< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT. The time now is 06:57 AM.


vBulletin, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 2005-2016, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional