Need the location of the ribbon button pressed

D

David Thielen

C

Colbert Zhou [MSFT]

Hello Dave,

Unfortunately, we cannot get the exact location of ribbon button pressed.
Currently, no Office APIs exposed for a ribbon control's position. And the
ribbon controls are drawn directly by Office application, so they are not
tranditional native window. We cannot get their positions by calling
Windows API either.

See my same discussions recently in MSDN forum,
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/2c309a7a-8e7b-4035
-814c-7b0d5d70fd96


Best regards,
Ji Zhou
Microsoft Online Community Support
 
D

David Thielen

Hello Dave,

Unfortunately, we cannot get the exact location of ribbon button pressed.
Currently, no Office APIs exposed for a ribbon control's position. And the
ribbon controls are drawn directly by Office application, so they are not
tranditional native window. We cannot get their positions by calling
Windows API either.

See my same discussions recently in MSDN forum,
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/2c309a7a-8e7b-4035
-814c-7b0d5d70fd96

OW! Ok, we'll use the mouse position - but I'm not wild on that.

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
T

Tony Jollans

This can be done using the Accessibility Interface - see my website for a
basic example of using it in VBA. Once you get an IAccessible interface for
your control, you can use the accLocation method to get the location.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top