
Laura W. answered 05/28/19
Microsoft Office Trainer and Author
I don’t know of any plugins, but you can certainly do it easily enough with styles. Format a snippet of code the way you want it to appear (indentation, font face, font size, etc.) and select it. Right-click and from the drop-down that appears select Styles, then Save Selection As a New Quick Style.
Give it a name and click on Modify…
Make sure this style is available to all documents by clicking on New documents based on this template.
Now you can add a shortcut to the style. Click on the Format button at the bottom and select Shortcut Key.
Select a combination of keys. In this case I chose Shift+Ctrl+Alt+C (which is currently unassigned).
Click on the Assign button to assign the shortcut to those keys.
If you’d prefer a macro, record the steps of assigning the style and then add the macro to a button on your Quick Access Bar. Let me know if you’d like the steps for that.