Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,
I am trying to extract specific text from word document based on coordinates, i have been searching many sites on this requirement ,but no luck. How to set the coordinates to the word document text ?

if any one know about this, could you share the answer.


Regards
Nanda Kishore.CH
Posted
Comments
Richard MacCutchan 23-Mar-15 8:08am    
What do you mean by co-ordinates, in reference to a Word document?
nandkishorre 23-Mar-15 8:17am    
in pdf document, we extracted data by coordinates using (llx,lly,urx,ury). like wise i want to extract word document data. is there any possible to get data ?
Richard MacCutchan 23-Mar-15 8:38am    
I have no idea how that is supposed to work, even for a PDF document. Where do these co-ordinates come from, and what do they refer to?
Leo Chapiro 23-Mar-15 8:12am    
I know only the possibility to navigate through Word document using the Bookmarks - is that what you mean?
nandkishorre 23-Mar-15 8:17am    
in pdf document, we extracted data by coordinates using (llx,lly,urx,ury). like wise i want to extract word document data. is there any possible to get data ?

1 solution

First regarding the extracting of specific text in Word documents, you can check out my following post: Find Text in Word Documents[^]
The provided code converts the DOCX files into a string, but now regarding your second requirements (extracting by coordinate), well this is somewhat impossible.

Word files are of a flow document type and its content is not fixed like in PDF files. To put it in another words in PDF a specific text is defined on a specific coordinates and it will always be rendered in the same location to anyone that is viewing the file.
But in Word files a specific text does not contain any information about where it will be rendered, it can be in first page or a fifth page, the content itself does not care about it, but instead the viewing applications does and different application can result in different rendering of the same document.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900