From: David Mullet Date: 2008-12-12T22:43:28+09:00 Subject: Re: How to get contents of word file page by page Talib Hussain wrote: > Hi, > > I have a 3 paged document, I want to read contents of each page. How cn > i do that. > > TIA, > Talib Hussain Assuming... -- You are working with a Microsoft Word document. -- You have actual page breaks between pages ...you can create an array of the text on each page by getting the document contents' text and splitting it on the page break. So, where doc is your Word document object, you can do this: pages = doc.content.text.split("\f") pages.each do |page| # do something with this page's text end Hope that helps. David http://rubyonwindows.blogspot.com http://rubyonwindows.blogspot.com/search/label/word -- Posted via http://www.ruby-forum.com/.