none
Deploying Quick Access Toolbar - Custom Icons Need to be Added Manually RRS feed

  • Question

  • I have created a quick access toolbar for deployment to other individuals.  After copying over the .dotm with the QAT and Macros and the Word.officeUI files, all standard icons are present on the QAT but I have to manually add (i.e., using "Customize Quick Access Toolbar") all custom icons.

    I have Word 2010 and created the custom icons using Custom UI Editor for Microsoft Office.  To add the icon images and XML, I open/edit the .dotm file that is deployed with the Word.officeUI file.  The XML in the editor for each button is similar to the following (see below).  Once I add the buttoms manually via searching for their Labels in the Customize Quick Access Toolbar dialog, all function as intended.  Any thoughts on how to deploy a QAT that contains custom icons without having to manually add the custom icons?  Any help would be appreciated.  Thank you.

    <button id="AbbrevTitle"label="Label Text"image="AbbrevTitle"onAction="RunMacro"/>

    Thursday, May 7, 2015 8:25 PM

Answers

  • Thank you for the responses.  I was able to get all icons to show after distribution.  I was creating the QAT using "Customize the QAT," with "For all documents (default)" selected at the top-right of the "Customize the QAT" window.  This allowed the toolbar to be distributed by sharing the Normal.dotm (which contained the styles and macros) and Word.officeUI (which contained the QAT).  This method, however, did not allow the custom icon images to show immediately after deployment (as noted above).

    The solution was to recreate the QAT using "Customize the QAT," with "For Normal.dotm" selected at the top-right of the "Customize the QAT" window.  To avoid duplication of the QAT buttons, I then had to reset the QAT corresponding to "For all documents (default)."

    Using this method, I no longer have to share the Word.officeUI file in order to deploy the toolbar.  Additionally, users can still customize their own QAT (if they select "For all documents (default)" in the "Customize the QAT" window, and they are not overwritten by the QAT included in the Normal.dotm template (since the "For all documents (default)" QAT is stored in the word.officeUI file).

    This solution works great for me, but I can see instances where you would want the user to be able to maintain their own Normal.dotm (e.g., if they need to create and use custom styles, building blocks, quick tables, etc.) since all of those features are maintained (I believe) in the user's Normal.dotm file (which I have a .bat file to replace in the Windows StartUp folder - thus resetting the user's customizations nearly each day).

    My next project is to experiment with some of the other ways of deploying a toolbar so that I do not have to overwrite the user's normal.dotm or word.officeUI files, thus allowing the user to customize their MS Word to their liking and still have my toolbar.  I'm assuming I may need to look into creating a COM add-in, but if anybody else has any advice or other ideas for how to accomplish this, any suggestions would be much appreciated.

    Tuesday, May 12, 2015 7:21 PM

All replies

  • Do you deploy image files with the macro enabled office document? Are the specified images available?

    To customize the quick access toolbar you need to use the qat element in the ribbon XML markup for defining controls. Read more about the Ribbon UI in the following series of articles in MSDN:

    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)

    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)

    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)

    Friday, May 8, 2015 9:14 AM
  • Thank you for the reply.  I add the icon images to the .dotm using CustomUI Editor for Microsoft Office.  After deployment, the custom icon images are available (in “Customize the QAT”) but are not automatically placed on the QAT with the standard icon images.

    In other words, after install (involves copying over the .dotm and officeUI files), the user gets about half of the QAT buttons (standard Microsoft Office icons only), and the rest (roughly a dozen) have to be added manually by using "Customize the QAT.”  Doing this, the user is able to find the custom images and add them, so they are available, and the resulting toolbar is fully functional.  Perhaps the .dotm or officeUI files do not include all information necessary to load the custom icons?

    A sample of the XML from CustomUI is posted below, in case it helps: 

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">

    <ribbon>

    <tabs>

    <tab id="TabDemo" label="Control Icon Demo" visible="false" >

    <group id="customGroup" label="Custom Group">

    <button id="InsertTOC" label="Insert TOC" image="InsertTOC" onAction="RunMacro" />

    etc....

    Likewise, my callback looks like:

    Sub RunMacro(control As IRibbonControl)

      On Error GoTo ErrCatch

      If control.Tag = "" Then
        Application.Run control.ID
      Else
        Application.Run control.Tag
      End If
      Exit Sub

    ErrCatch:
      MsgBox Err.Number & vbCr & Err.Description & vbCr & control.ID
    End Sub

    Friday, May 8, 2015 2:22 PM
  • This is how to deploy Customized Ribbon and Quick Access Toolbar in Office 2010 ont the server side, and I think this could helps

    https://msdn.microsoft.com/en-us/library/ee704589.aspx

    Sunday, May 10, 2015 3:07 PM
  • Thank you for the responses.  I was able to get all icons to show after distribution.  I was creating the QAT using "Customize the QAT," with "For all documents (default)" selected at the top-right of the "Customize the QAT" window.  This allowed the toolbar to be distributed by sharing the Normal.dotm (which contained the styles and macros) and Word.officeUI (which contained the QAT).  This method, however, did not allow the custom icon images to show immediately after deployment (as noted above).

    The solution was to recreate the QAT using "Customize the QAT," with "For Normal.dotm" selected at the top-right of the "Customize the QAT" window.  To avoid duplication of the QAT buttons, I then had to reset the QAT corresponding to "For all documents (default)."

    Using this method, I no longer have to share the Word.officeUI file in order to deploy the toolbar.  Additionally, users can still customize their own QAT (if they select "For all documents (default)" in the "Customize the QAT" window, and they are not overwritten by the QAT included in the Normal.dotm template (since the "For all documents (default)" QAT is stored in the word.officeUI file).

    This solution works great for me, but I can see instances where you would want the user to be able to maintain their own Normal.dotm (e.g., if they need to create and use custom styles, building blocks, quick tables, etc.) since all of those features are maintained (I believe) in the user's Normal.dotm file (which I have a .bat file to replace in the Windows StartUp folder - thus resetting the user's customizations nearly each day).

    My next project is to experiment with some of the other ways of deploying a toolbar so that I do not have to overwrite the user's normal.dotm or word.officeUI files, thus allowing the user to customize their MS Word to their liking and still have my toolbar.  I'm assuming I may need to look into creating a COM add-in, but if anybody else has any advice or other ideas for how to accomplish this, any suggestions would be much appreciated.

    Tuesday, May 12, 2015 7:21 PM