SHORT: I would like to add a drop-down menu to the quick access toolbar of any instance of Word 2010 via placing a customized .dotm-file in Word's startup folder. I fail in creating this customized .dotm-file.
LONG: I've been writing a little "add-in" for Word 2010, first with VSTO, then figured out problems with the deployment, now with VBA. The add-in should simplify adding my company's logo and legal notice to documents (different combinations of logos & legal notices exist).
In order to allow selection of wished logo and legal notice with as few clicks as possible, I thought about automatically adding a drop-down menu to the quick access toolbar (qat). I want to do this by placing a .dotm-file containing the code for this qat-extension & the logic for the header/footer-setting in the user's Word startup-folder.
I have already succeded in adding such a drop-down menu to the Add-Ins-Ribbon using CustomUI, everything works fine on the code side. Via the menu the user can choose from all presets supplied and headers and footers are added successfully.
Furthermore, I have seen and played with examples that successfully add controls directly to the qat.
If placed in my startup-folder, these examples do a perfect job and the controls defined therein appear on any instance of Word. The way to go is to create a new folder "userCustomization" in the .dotm-document and then create the customUI.xml-file with several restrictions (no custom icons allowed e.g.).
Unfortunately, I was not able to figure out how to implement a drop-down-menu control in the qat. All the examples I found only used "simple" (button) controls and no matter how many times whatsoever I tried wrapping buttons in a tag, i never got it working.
I can on the other hand manually add my ribbon via "qat => add controls" to the qat and .. voilà .. it's there, working exactly as wanted, so i suppose it must be possible. But what I need is to automate this so that our users don't have to do any configuration of the qat.
Help would be very much appreciated! Best regards from Germany, Kurt
This is how the drop-down menu is added to the Add-Ins-tab:
<ribbon>
<tabs>
<tab idMso="TabAddIns">
<group id="MyGroup" label="WordDesigner" visible="false">
<menu id="myMenu" label="Design einfügen" size="large" image="menulogo">
<menu id="mySubMenu" label="Rechnungswesen" image="icon2">
<button id="MahnUndKlage" label="Mahn- und Klage" image="icon3" onAction="DesignAnwenden"/>
<button id="Buchhaltung" label="Buchhaltung" image="icon3" onAction="DesignAnwenden"/>
</menu>
<button id="Personalabteilung" label="Personalabteilung" image="icon3" onAction="DesignAnwenden"/>
<button id="Verkauf" label="Verkauf" image="icon4" onAction="DesignAnwenden"/>
<button id="clearHeaderAndFooter" label="Gestaltung entfernen" image="icon5" onAction="DesignAnwenden"/>
</menu>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Usefull information I found included:
- Greg Maxey on modifying icons in the qat
- in german, part 18 of an introduction to RibbonX