mathlover has asked for the wisdom of the Perl Monks concerning the following question:

I am running Excel 2007 on Windows 7 with ActiveState's ActivePerl V5.12.1. I would like to use Win32::OLE to control and respond to events from Excel's ribbon. Is it possible to do that from Perl?

Replies are listed 'Best First'.
Re: How do I control Excel 2007 Ribbon?
by Anonymous Monk on May 05, 2011 at 00:42 UTC
    Is it possible to do that from Perl?

    Yup

      Wonderful! Can you please show me a code snippet that explains how I can tie the callbacks functions in Perl code to the ribbon definition? For example, I need to define a callback function in Perl to set the name of a label for a group that is defined by the following tag:

      <group id=”myGroup” getLabel=”myGetLabel”>

      I am assuming that I have to use Win32::OLE->WithEvents but I am not sure how to do it.