How to Add a One-Click Word VBA Macro Button to the Ribbon
Question details
The user needs a way to trigger a custom VBA macro using a single click from the main interface.

- Product
- Microsoft Word (Office 2021)
- Device & OS
- not provided
- Scenario
- After upgrading to Office 2021, a previously working VBA macro is buried in the menus, and the user wants to restore immediate access to it via a button.
- Observed behavior
- The macro is fully functional but lacks a dedicated UI button on the Home ribbon or Quick Access Toolbar for quick execution.
Ensure your VBA macro is correctly saved in your Normal template or current document, and that macros are enabled in your Office Trust Center settings.
Add a Macro Button to the Word Ribbon
Create a custom group on your Home tab to pin your most frequently used VBA macros for instant, one-click access.
By default, Word's main ribbon tabs are locked, but you can easily create custom groups within existing tabs to house your specific macro buttons and personalized commands.
Open Microsoft Word, click on 'File' in the top-left corner, and select 'Options' located at the very bottom of the left-hand menu.
In the Word Options dialog box, select 'Customize Ribbon' from the left sidebar settings panel.
In the right-hand column (Main Tabs), click to expand the 'Home' tab. Click the 'New Group' button at the bottom. Select the newly created group and click 'Rename' to give it a descriptive name like 'My Macros'.
In the left-hand column under 'Choose commands from', click the dropdown menu and select 'Macros'. Find your specific VBA macro in the list below, ensure your new custom group is highlighted on the right side, and click the 'Add' button in the center.
Select the newly added macro inside your custom group on the right, then click 'Rename'. Enter a shorter, user-friendly label for the button and choose a distinct icon from the gallery. Click 'OK' to save all changes.

Pin the Macro to the Quick Access Toolbar
Place the macro button at the very top of your application window so it remains visible regardless of which ribbon tab is currently active.
Run Macros Seamlessly in WPS Writer
WPS Office offers a highly customizable interface that allows you to manage and run your macros with just one click. You can easily tailor your ribbon or Quick Access Toolbar to keep your automation tools front and center.
- 1. Open Options: Open WPS Writer, click the 'Menu' button at the top left, and select 'Options'.
- 2. Customize Ribbon: Choose 'Customize Ribbon' from the settings panel on the left.
- 3. Locate Macros: Select 'Macros' from the 'Choose commands from' dropdown.
- 4. Add Custom Button: Create a new group on your preferred tab, add your macro to it, assign an icon, and click 'OK'.

Frequently Asked Questions
Why can't I find my macros in the Customize Ribbon list?
If your macros are missing from the 'Choose commands from' dropdown list, ensure that the macro is saved in a currently loaded template (like the Normal template) or the active document, and that macros are properly enabled in the Trust Center settings.
Can I assign a custom keyboard shortcut to my VBA macro instead of using a button?
Yes. In the Word Options menu, select 'Customize Ribbon', then click the 'Customize' button next to 'Keyboard shortcuts' at the bottom of the window. Scroll down to 'Macros' in the Categories list, select your macro, and assign a specific key combination.
Will my custom macro button transfer if I send the Word document to someone else?
By default, ribbon customizations are saved locally to your Office application settings. To share a macro and its associated custom ribbon button with another user, you must save both the customization and the VBA code within a macro-enabled template (.dotm) and distribute that specific template file.




