------ extPart_000_0000_01C7E4A7.66F0FFD0
Content-Type: text/plain;
charset S-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 IN32OLE.new('Word.Application')
wrd.Visible
# First argument to script is the name of the macro
macro1 RGV.shift()
# Everything else is a document on which to run the macro
ARGV.each do |file|
doc rd.Documents.Open(File.expand_path(file))
wrd.Run(macro1)
doc.Save()
doc.Close()
end
wrd.Quit()
------ extPart_000_0000_01C7E4A7.66F0FFD0--