Ty Anderson

Customizing Word User Interface: What is and isn’t customizable

Word is a stalwart… a pillar of the Office application suite. It’s been around since I was in junior high. It’s ubiquitous. And because of its familiarity, it is not possible to know whether Microsoft Word has adjusted to the needs of its users or if it is vice-a-versa.

For the casual or infrequent user of an Office application, the best path to productivity is to adjust to the application. This type of user should learn the main commands as presented by the app. If they run into trouble, they can hit F1 of search Google (or BING!).

But for the advanced user who views Word as essential to their daily grind at the office… Word needs to do some adjusting to the user. This user has well defined grooves in their workday. They work spans across multiple teams, departments, companies, and applications. Microsoft Word can be a player in these processes and you can put Word in the best position possible. But how?

Well, the best way to know where and how to utilize Word is to understand its strengths. Today, we’ll go a long way toward this goal by covering the customization options supported by Word’s user interface and Add-in Express.

Customizing the Word Ribbon

Word 2007 – 2013 utilize the Office Ribbon toolbar. The ribbon is the place for buttons and other controls that allow users to take action and invoke the features your solutions provides.

If you read Pieter’s article covering Outlook’s UI customization options, then you know everything you need to know. Granted, Word is simpler because there is a single window type and there are only documents to as the main “data type” (verses Outlook’s two windows and multiple item types).

Designing a custom Word ribbon tab in Visual Studio

Just add an ADXRibbonTab component to the AddinModule and start designing the Ribbon’s layout.

The custom ribbon tab in Microsoft Word 2013

And just like you can with Outlook, you can use the Ribbon’s Context property to display your custom Ribbon only for a specific Word context.

Setting the Ribbon's Context property to display the custom Ribbon only for a specific Word context.

For example, by setting the Context property to Word.TabSetHeaderAndFooterTools, your custom ribbon will display only when the user works with the header and footer design view.

The custom ribbon tab will be displayed only when the user works with the header and footer design view

Customizing Word CommandBars

The CommandBars (or toolbar) are relevant to Word 2003 and older. That might sound old and deprecated but the fact is, a significant number of companies still use these Word versions. As a result, it behooves you to support CommandBars in your Word solutions. You do this by adding an ADXCommandBar control to the AddinModule.

Designing a custom commandbar in Visual Studio

The above image shows an ADXCommandBar in its visual designer in Visual Studio. The design closely mirrors the custom ribbon. Given command bars do not have a control that equates to the Ribbon’s split button control, this design uses the combination of the drop down control combined with a command bar control. It’s not the same but it’s close.

Adding controls to the custom commandbar

With command bars, you can host .NET control by adding an ADXCommandBarAdvancedControl to the command bar. Then you add a .NET control to the AddinModule design surface and specify it as the value in the Host property of the ADXCommandBarAdvancedControl.

Creating custom Backstage views

The Backstage view, introduced with Word 2010, contains the commands intended for working “with” a document (as opposed to working “on” a document). These are the commands that exist behind the scenes. The have their own view so that they don’t clutter the Ribbon and the main UI. Creating a custom Word Backstage is easy as adding the ADXBackstageView component to the AddinModule. Well almost… you will need to add controls and configure them using the Add-in Express visual designer.

Designing a custom Backstage view in Visual Studio

The backstage is a good location to place options and administrative features.

The custom Backstage view in Word 2013

Creating custom Word task panes

Microsoft Word supports custom task panes. Task panes display within the Word window next to a document. They are intended to aid the user as they create a document. They are good place to add features that allow them to insert content or view issues within the active document… all without interrupting them with nasty dialog boxes.

The custom Word task pane's design

Add-in Express’s Advanced Task Panes go further than standard Office task panes by supporting four display locations (top, bottom, left, and right). You specify where to display the panes initially, and if you allow it, the user can move it to any supported location.

Advanced task pane in Word 2013

In addition, Add-in Express automatically saves the custom pane’s display state. You don’t need to write code to do it.

As you see in the screenshot above, the additional features are within reach, elegant, and quite useful for the task at-hand.

Customizing Word context menus

The context menu is the right-click menu that provides users with useful, contextual relevant commands. You can add a custom context menu to Word add-ins by adding either one of these:

  • ADXRibbonContextMenu – use this for Word 2010 and Word 2013.
  • ADXContextMenu – use these for Word 2007 and earlier

Using the visual designer, you can quickly design your ribbon context menus…

Designing a custom ribbon context menu for Word 2007 - 2013

… and your context menus…

Designing a custom context menu for Word 2003 and lower

… and impress your users.

The custom Word right-click menu in action

***

Word’s user interface provides several customization options. With what’s possible, there is no reason you can’t build beautiful UIs for your solutions that provide a pleasurable experience to your users.

Word add-in development in Visual Studio for beginners

6 Comments

  • Bob Apostolico says:

    I would like to be able to change the right-click context-menu that pops-up in word with the

    Font …
    Paragraph…

    Translate…

    Menus.

    I can’t figure out which Context-menu to put the hooks into.

    I’ve tried:
    Word.ContextMenuText
    Word.ContextMenuTextEdit
    Word.ContextMenuTextEffect
    Word.ContextMenuRichTextFont
    Word.ContextMenuRichTextParagraph

    and nothing seems to ever appear.

    I’ve downloaded the sample. The sample works, and I’ve edited the sample to make the pop-up appear on the “Spell” context menu… BUT in order for it to actually appear, I have to have a typo. Or the HyperLink context menu, and that works too.

    HOW do you get it work pop-up and alter the general context-menu when you right-click in text, whether there’s a typo in the text or not ?????

    Thank you.
    Bob

  • Ty Anderson says:

    Hi Bob,

    Which version of Word are you using? It sounds like Word 2007 or later.

    From what you describe, you want to use the Word.ContextMenuText menu. This is the one I used in the sample.
    If you use the Spell context menu, it makes sense that it only displays when Word recognizes a typo.

    What happens if you switch it back back to use only the Word.ContextMenuText menu?

    We’ll figure this out

    Ty

  • Bob Apostolico says:

    Hi Ty,

    Internally, we’re using Office 2010. I made the change and NOW it worked!??
    Thursday, I had numerous people looking at the code, and it would not appear in the normal ContextMenuText menu, which was the 1st thing I tried.

    Are the certain orders of operations that need to be carried out (un-register ADX project, Build/Compile, then Re-Register ADX project) when the requested hooks in the context-menu items change??

    With our plugin, we support multiple office versions.
    For Word 2003, we’re changing the adxContextMenu.CommandBarName = “Text”
    Is this correct?

    For word 2007+ we’re changing adxRibbonContextMenu.ContextMenuNames = Word.ContextMenuText.

    Additionally, the real/heart of our plugin is for targeting OUTLOOK to assist when constructing an Email. Is there something extra/special that we’d need to do to make sure the Right-click/context menu that appears when constructing an email is updated with our custom links?

    With Outlook 2003, I think someone can turn OFF Word as being the default editor.
    Is there another Context Menu we need to target to ensure our plugin is visible in this scenario?

    Thank you!
    Bob

  • Dmitry Kostochko (Add-in Express Team) says:

    Hi Bob,

    It’s good that it works, strange that it didn’t work before.

    >> Are the certain orders of operations that need to be carried out (un-register ADX project, Build/Compile, then Re-Register ADX project) when the requested hooks in the context-menu items change??

    If the project is registered, it is enough to compile it for the changes to be applied.

    >> For Word 2003, we’re changing the adxContextMenu.CommandBarName = “Text”. Is this correct?

    Yes, correct, it should work.

    >> Additionally, the real/heart of our plugin is for targeting OUTLOOK to assist when constructing an Email. Is there something extra/special that we’d need to do to make sure the Right-click/context menu that appears when constructing an email is updated with our custom links?

    As far as i remember you don’t need to do anything special. Word context menus work properly in Outlook when composing an email.

    >> With Outlook 2003, I think someone can turn OFF Word as being the default editor. Is there another Context Menu we need to target to ensure our plugin is visible in this scenario?

    The context menu that appears in Outlook 2003 and earlier when Word is not used as a default editor is not customizable. This is the limitation of the Office Object Model.

    Bob, I would suggest that your contact our Support Team for further assistance with this technical issue.

  • musa says:

    Hi, i am making a vsto word add in. Pls guide me on the procedure of making a UI and front end design of the respective vsto word extension.

  • Andrei Smolin (Add-in Express Team) says:

    Hello musa,

    Add-in Express doesn’t do VSTO add-ins. I suggest that you google for a suitable resource.

Post a comment

Have any questions? Ask us right now!