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.
Asked
Active
Viewed 35 times
2 Answers
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
-
Can you please provide the code snippet so that it helps me as I am new to this. – Ashwani Tandon Jul 20 '22 at 06:06
-
See your previous question - https://stackoverflow.com/questions/73038057/want-to-send-the-object-type-data-from-one-vsto-addin-project-to-another-vsto-ad/73039824#73039824 – Dmitry Streblechenko Jul 20 '22 at 14:54
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