this will help How can I do something with text in my word document using button in word add-in? I don't know, how to get text from document after click on the button, because Application is not accessible in Ribbon class. , The following code should take the text found in the selection:
Hope this helps No, the Fluent UI (aka Ribbon UI), nor the Word object model, doesn't provide any event for that. If you have got your add-in's controls on a particular tab you may consider handling callbacks that should be fired when the tab is going to be shown.
Custom Ribbon XML Tab not showing in WORD VSTO Add-In