From: gregarican Date: 2005-09-10T20:36:31+09:00 Subject: Re: Ruby 1.6.8 win32ole.so File? daz wrote: > It's in here: > > ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ext/win32ole-0.5.2-... > > > daz Thanks so much for pointing this out to me. Now my code should be a lot nicer. I can use: winword=WIN32OLE.new('Word.Application') winword.Documents.Open("#{@myWordDocument}") winword.visible = true As opposed to this: tempFolder=ENV['TEMP'] launchFile=File.new("#{tempFolder}\\launchFile.bat", "w") word2k="c:\\program files\\microsoft office\\office\\winword.exe" wordXp="c:\\program files\\microsoft office\\office10\winword.exe" word2k3="c:\\program files\\microsoft office\\office11\winword.exe" wordExe=word2k if File.exist?(word2k) wordExe=wordXp if File.exist?(wordXp) wordExe=word2k3 if File.exist?(word2k3) launchFile.write("\"#{wordExe}\" \"#{@myWordDocument}\"\nexit\n") launchFile.close system("#{tempFolder}\\launchFile.bat")