1

My problem that i d'ont know how to show or hide the QAT Quick Access Toolbar in word with vba

Hello,

Is it possible to show or hide the QAT Quick Access Toolbar in vba?

With the code Application.CommandBars.ExecuteMso ("MinimizeRibbon") I can hide the whole Ribbon but not only the QAT. Is there an idMso for the QAT?

Best Regards,

David

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Bdadoo57
  • 11
  • 2
  • 2
    Cross-posted at https://www.msofficeforums.com/word-vba/50564-how-show-hide-qat-quick-access-toolbar.html. For cross-posting etiquette please see https://excelguru.ca/a-message-to-forum-cross-posters/ – Timothy Rylatt Mar 09 '23 at 18:56
  • Use [Custom UI Editor](https://bettersolutions.com/vba/ribbon/custom-ui-editor-download.htm) – Maciej Los Mar 09 '23 at 19:02
  • Read this too: [Show or hide the Quick Access Toolbar](https://support.microsoft.com/en-us/office/customize-the-quick-access-toolbar-43fff1c9-ebc4-4963-bdbd-c2b6b0739e52#bkmk_show_hide_qat) – Maciej Los Mar 09 '23 at 19:10

1 Answers1

0

You may try to use the following ribbon XML to hide all QAT items:

...
<qat>
  <sharedControls>
    <button idMso="QuckAccessToolbarCustomization" visible="false" />
  </sharedControls>
</qat>
...
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thank you very much for your feedback! The a problem i have with a custom QAT, it's with startFromScratch="true" which hides all other tabs (except the custom ribbon). Is there a solution? Sincerely, David – Bdadoo57 Mar 10 '23 at 12:38
  • Nope. There is no trivial way for hiding the QAT only. A possible solution is described in my post. – Eugene Astafiev Mar 10 '23 at 12:50
  • Thank you very much for your feedback! Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",false)" is for excel if I'm not mistaken and not for word. – Bdadoo57 Mar 11 '23 at 10:47
  • Yes, the `ExecuteExcel4Macro` method exists in Excel only. – Eugene Astafiev Mar 11 '23 at 12:20