0

Can someone please please provide the link or code snippet to raise an event from the click of the oulook ribbion button and we are able to subscribe it from the another project on the click of another button and get the data passed in it.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Ashwani Tandon
  • 129
  • 1
  • 5

2 Answers2

0

You can't directly - ribbon control events are only passed to the addin that created the ribbon controls in question. You can of course call any external code (including through Addin.Object) from the addin processing the event.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0

You can handle clicks on the built-in controls on the ribbon. Read more about that in the Temporarily Repurpose Commands on the Office Fluent Ribbon article.

But for the custom ribbon UI you need to ask for any public interface which can be consumed by others, so instead of trying to repurpose controls you could directly call the method or function in the add-in.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45