Hello, At 09/03/2009 07:23 AM, Chuck Remes wrote: >> C:/Ruby/lib/ruby/gems/1.8/gems/pr-win32ole-1.0.0/lib/pr/win32ole.rb:4481 >> from (eval):3:in `call' >> from (eval):3:in `DispatchMessage' >> from > > Okay, dug into the pr-win32ole code and this is what I found. > > Line 701 was trying to access index 8 of a string with only 4 > characters. Backing up the stack I looked at where it was passed in from > and see that the +pvarResult+ variable passed into the lambda had the > value "\n\000". The lambda in question is on line 4400. > > I don't know this code well enough to say where that came from > originally, but that explains the IndexError anyway. It looks like the > code that operates on those strings assumes they are 16 characters long. > That assumption blew it up. How about commenting the 3 lines from line 4480 to line 4482? Does it work? ary2ptr_dispparams(outargv, pdispparams) end # if pvarResult # WIN32OLE.ole_val2variant(result,pvarResult) # end S_OK }) Regards, Masaki Suketa