Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public override void Action()
{
Application.ActiveDocument.CurrentSelection.Changed += CurrentSelection_Changed;
}
public void CurrentSelection_Changed(object sender, EventArgs e)
{
var selection = Application.ActiveDocument.CurrentSelection;
MessageBox.Show(selection.SelectedItems.First.ClassDisplayName.ToString());
Application.ActiveDocument.CurrentSelection.Changed -= CurrentSelection_Changed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment