Updated: 23 October 2023
Add a traditional Command Button to the body text of a Word Document and run VBA code from that button:
- Go to Developer tab.
- Go to Controls area on Ribbon.
- From the drop down ‘Legacy Tools’ select ActiveX Controls and Command Button.
- Right click on the button and select Properties.
- Give the button an appropriate name.
- Give the button an appropriate caption.
- Right click on the button and select View Code – this is the entry point to your VBA.