How to make Win32::OLE work on 64bit MS OFFICE installation

混江龙づ霸主 提交于 2019-11-30 14:01:47
bl89

I use your Win32::OLE::Const module to have the Excel constants available in Perl.

Recently, I had a clean Win7 x64 install with Office 2016 and the script was not working anymore (using the latest version Win32::OLE::Const module which is installed with the current (on 06/04/2016) ActiverPerl 64 bit installation).

After some investigation, I have found out that the Win32::OLE::Const did not see the Excel automation object although it was well registered and available in the registration database.

In the registration database the following key contains the path to the Excel executable:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00020813-0000-0000-C000-000000000046}\1.9\0\Win64

If I add manually a new key

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00020813-0000-0000-C000-000000000046}\1.9\0\Win32 

with the same path as for the Win64 key then the Perl script found the Excel typelib and worked again.

Hope this helps.

user7880952

Registry key also helps with Outlook 2013.

/HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.5\0\win32
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!