Hello,
I have the following code:
Word.Selection selection = Globals.ThisAddIn.Application.Selection; if (selection != null && !String.IsNullOrEmpty(selection.Text)) { string selectionText = selection.Text; System.Windows.Forms.MessageBox.Show(selectionText); }
This code shows a message box with the selected text when I right-click on it.
My question is, how can I make it work without having to have the word selected, but still show the word it was clicked on - just like
synonyms and definition works.
Thank you