The attached example rbw file will correctly execute "moose" from inside
Tk on Windows 7 with Ruby 1.9.3p125, with Office 2010 installed.
However, on Windows XP, with everything else the same, it fails.
The win32ole command works fine when called outside of Tk on either
version of Windows, but when called as in the attached, it fails with
the error "CoInitialize has not been called".
I have confirmed that this works on 6 machines with Windows 7 (4 using
Ocra), and fails on 2 machines with XP (1 using Ocra).

My guess is that it's not Tk itself, but that fact that win32ole is
being used by a thread other than the main script.

My question, in short, is how can I write a Tk application which is
capable of opening excel in both Windows 7 and XP?

Thanks,

Joe

Attachments:
http://www.ruby-forum.com/attachment/7727/excel.rbw


-- 
Posted via http://www.ruby-forum.com/.