0

for example, one thing I normally do is, select several paragraph of code, set the fonts to Consolas, size to 10, paragraph spacing as 0 for both before and after, then set the shading to "White, Background 1, Darker 5%".

is it a way to set a shortcut for this, e.g. a button on the toolbar or some hotkey?

2 Answers 2

2

Use a macro in Word.

  1. On the Developer tab, in the Code group, click Record Macro.
  2. Click "Begin Recording" and perform the actions you would like to the macro the replace.
  3. To stop recording your actions, click Stop Recording in the Code group.

Refer to this article for the full rundown on how to set up the macro, including assigning it a hotkey.

If your needs require finetuning, I recommend using the Visual Basic Editor to modify the actions you need.

Not enough? Try AutoHotKey, a scripting tool that will allow you to perform even more complex actions and automation.

1
  • it doesn't work -- after clicking "begin Recording", i can't select paragraphs or right click on selected paragraphs to set its fonts etc. but nvm, i think macro is the direction to go. thx.
    – athos
    Sep 25, 2016 at 9:51
0

Select the paragraph once formatted and then create a new paragraph style by going to the Style section on the "Home" tab, click corner arrow and select the icon at the bottom left, per the screenshot: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.