Last post Apr 07, 2014 10:58 PM by leo_456
Jan 26, 2011 11:45 PM|rishi_raj2121|LINK
I need to read the word document using C#. I am differentiating the headings from the content with font-size. But only problem in this case is I am not able to skip the content if the heading's font-size is not according to my given
input. So if anyone knows the solution using this scenario or any other way please reply me as fast as possible.
thx in advance
Jan 27, 2011 02:59 AM|rishi_raj2121|LINK
Now a different scenario , can anyone tell me how to read bulleted items inside word document ?
Sep 10, 2011 07:35 AM|GotiBandhu|LINK
please check out the following links.......
Sep 13, 2011 10:55 AM|kneville|LINK
I will start my post with a question - where did you get the Word document that you are going to read?
If it is being generated by your application, then it is much better to bookmark each section that your application will read. For instance, you have the following text in your Word document
Bookmark Again and Again
Assign a "test" bookmark to "Bookmark Again and Again" and the following code can be used to retrieve the value selected when Find Bookmark is initiated
Dim strText As String
Selection.GoTo What:=wdGoToBookmark, Name:="test" 'this is the Find Bookmark statement
Selection.Find.ClearFormatting 'you don't really need this. But Word will automatically create this (+ bunch of other stuff) for you via Record Macro
strText = Selection.Text 'retrieve what is currently selected / highlighted
Hope this helps.
Feb 18, 2014 08:15 AM|kannadasbe|LINK
Check the below link. It has the source code to read the word document.
Asp.Net - How to read word file in C#.Net ,VB.Net
Feb 21, 2014 04:54 AM|akhleshchauhan|LINK
use nuGet pakages for word opration it's free and fast enjoy
DocX is a .NET library that allows developers to manipulate Word 2007 files, in an easy and intuitive manor.
Aspose.Words for .NET is a class library for .NET that enables you to perform a wide range of document processing tasks directly within your .NET applications.
Apr 07, 2014 10:58 PM|leo_456|LINK
Your question confused me.
Are you just going to integrate your application with find function,which enables to find specific text or phrase.If so,the code below maight be useful.
Document doc = new Document();
doc.LoadFromFile(@"E:\work\Documents\A GOOD MAN IS HARD TO FIND.docx");
TextSelection textSelections = doc.FindAllString("Bailey", true, true);
foreach (TextSelection selection in textSelections)
selection.GetAsOneRange().CharacterFormat.HighlightColor = Color.Green;
Alternatively,you can also turn to the page that concerned.https://wordviewer.codeplex.com/ [^]