From: Chad Fowler Date: 2004-01-28T04:57:09+09:00 Subject: Re: Looking for Win32OLE sample code (Tables in Word) On Wed, 28 Jan 2004, Jim Freeze wrote: # Hi # # # I am looking for some sample code (or OLE reference) # that will let me write some simple tables into a word # doc using ruby and win32ole. # # Any pointers would be greatly appreciated. # require 'win32ole' word = WIN32OLE.new("Word.Application") word.visible = true word.documents.add word.ActiveDocument.Tables.Add(Word.selection.range, 4, 2) selection = word.selection 4.times { selection.typetext "Hello" selection.moveright selection.typetext "World!" selection.moveright selection.moveright } Brian Marick also has a really nice article on his website about using Ruby as a testing tool for Windows applications. He uses Word as the example application: http://www.testing.com/writings/bypassing-the-gui.pdf Chad