frida has asked for the wisdom of the Perl Monks concerning the following question:
To gain access to mso constants, I need this:use Win32::OLE; use Win32::OLE::Const 'Microsoft.Word'; # wd constants
by experiment, I have found that this does not return mso constants; instead, I get dbo constants, at least on my Windows 7 (x64) perl environment (5.14.1). What does work is:use Win32::OLE::Const 'Microsoft Office';
However, this script runs with office 2003, 2007, or 2010 (substitue 12.0 or 14.0, and it will work). Right now, I insert 3 use statements in increasing order:use Win32::OLE::Const 'Microsoft Office 11.0 Object Library'; # office + 2003
but this is ugly and causes nastygrams to be emitted by perl. Monks, what monk-magic would you suggest?use Win32::OLE::Const 'Microsoft Office 11.0 Object Library'; # mso c +onstants use Win32::OLE::Const 'Microsoft Office 12.0 Object Library'; # mso c +onstants use Win32::OLE::Const 'Microsoft Office 14.0 Object Library'; # mso c +onstants
|
|---|