From: David Mullet Date: 2008-12-13T22:45:00+09:00 Subject: Re: Tables word problem in Ruby Hai anh Le wrote: > My problem is about table in Word. With Ruby I can access, modify, save > as... word document to txt document. But I don't find the code to work > with tables. I see that every tables is destroyed its format if I save > as word format-> txt format. Have anybody know about the issue ? I only > want the code detect tables and maintain it. If unfortunately, we have > no way maintain, we can remove all tables from txt document (because > it's not necessary) My first thought is that you could convert your tables to tab-delimited text prior to saving the document. This can be done by calling the ConvertToText method on each table, passing it a value of 1 (wdSeparateByTabs): Where doc is your Word document object: for table in doc.Content.Tables table.ConvertToText(1) end Does that help? David http://rubyonwindows.blogspot.com http://rubyonwindows.blogspot.com/search/label/word -- Posted via http://www.ruby-forum.com/.