Posts

Showing posts with the label VSTO

Yet another bad sample from Microsoft

Image
Recently I played a bit with the  Microsoft Azure Information Protection  add-in for Outlook which  helps classify, label and protect sensitive data in your organization, based on a simple and intuitive end-user interface and IT policies. And here is what I see in Outlook: a ribbon UI error which comes from the MS add-in It is a shame for MS developers to produce such software being a well-known industry leader.  BTW Also noticed, the add-in itself was not built on top of VSTO (Visual Studio Tools for Office). Interestingly, but the Microsoft team decided to use a third-party framework called Add-in Express which is a competitor of their own development toolset packaged with Visual Studio.

A bad sample from the VSTO team (Microsoft)

Image
Microsoft Office add-in developers are aware of the setting for displaying ribbon UI errors. So, I keep it set everywhere to prevent releasing the code that may lead to UI errors on end users machines. Here is where you can find the option for enabling that: See  How to: Show Add-in User Interface Errors  for more information. And recently after latest updates for Microsoft Office, I suddenly started getting annoying error message boxes in Excel with UI errors. I have got Excel with the following build numbers installed on my machine: Microsoft Excel 2016 - 16.0.9330.2073 - 32-bit   Here is how it looks like in Excel, the error message bombs users twice when they try to open the File menu (the File backstage tab) and go back, or just open another workbook - a lot of cases: As you see on the screenshot, the caption says that an error message is caused by the VSTO design-time adapter for Excel. Then I checked the list of COM add-ins in Excel and f...

Microsoft Word: How to get a selected word when you do a right click

Image
One of the widely spread tasks in word is to get the current word for processing it further. For example, you typed a single word and what to do some actions against it, or search in the dictionary (database) for such entries. I.e. do whatever you need. When you do the right click on the word you may see the context menu with the Synonyms entry: Do you look for a similar implementation? If so, this article will give you a good start! The Word object model provides the Selection class. Unfortunately it doesn't provide any information about the currently selected word, i.e. where exactly the user did the right click. As one of the possible ways, to get the job done you may use the MoveStart* and MoveEnd* methods of the Selection class. I included asterisks intentionally to draw your attention to the fact that you may find other methods / variations useful. So here I will give you the basics. The MoveStartUntil method of the Selection class moves the start position...

getSuperTip and getScreenTip callbacks are useless in case of Ribbon labels

Image
I have been asked that some callbacks don't work for the labelContol , from the predefined set of Fluent UI controls. The Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3) article from the MSDN library provides the following attributes for the labelControl : enabled getEnabled getLabel getScreentip getShowLabel getSupertip getVisible id idMso idQ insertAfterMso insertAfterQ insertBeforeMso insertBeforeQ label screentip showLabel supertip tag visible As you may see the getSuperTip and  getScreenTip are included in the list. But they don't play any role in case of labelControl. You will never see a screen tip or super tip even for built-in labels, for example: The "Gridlines" and "Headings"don't show tips at all. That's a good indicator that labels don't display screen or super tips. As a workaround you may use a button control where you can set the enabled attribute set to false to get it dis...