From: Inge Zwart Date: 2007-08-23T05:08:29+09:00 Subject: Ruby & Word 2007 help ------=_NextPart_000_0000_01C7E4A7.66F0FFD0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I have a batchmacro that I use in Ruby with Word 2003. I converted to Word 2007 and now it doesn't work. Can anyone tell me how to change the code? The code is below: # batchmacro.rb # Ruby script for batch running Word macros require 'win32ole' # Launch new instance of Word wrd = WIN32OLE.new('Word.Application') wrd.Visible = 1 # First argument to script is the name of the macro macro1 = ARGV.shift() # Everything else is a document on which to run the macro ARGV.each do |file| doc = wrd.Documents.Open(File.expand_path(file)) wrd.Run(macro1) doc.Save() doc.Close() end wrd.Quit() ------=_NextPart_000_0000_01C7E4A7.66F0FFD0--