vstomicrosoft-information-protection

VSTO Sample code For Sensitivity label Ribbon Item OnClick Events in C#


I need to get changes to a sensitivity label done by clicking the Ribbon item in Microsoft Word.

Does anyone have sample code on catching event changes for sensitivity labels in particular for VSTO C#?

We are using ribbon XML and not ribbon designer and extending AddInBase to start up the word application.

I have tried Document events. I have tried Commands.

Any help will be greatly appreciated. I can't find much documentation for VSTO


Solution

  • These are some VBA references.

    You can try using the Document.SensitivityLabel property on ThisDocument/ActiveDocument and listen to the SensitivityLabel.LabelChanged event