Tuesday, September 18, 2018

How to Toggle Thesaurus On and Off in Microsoft Word

UPDATE 2018-09-19: The macro solution below seems to work only during the first instance of Word running the macro. It breaks when attempting to execute the macro in other instances of Word.

[See new solution using Recorded Keyboard Macros]

Issue:
Shift + F7 opens Thesaurus Tool pane in Microsoft Word. But Shift + F7 does NOT close the pane by default and you are forced to lift your hand from the keyboard and use the mouse to close it.

A million thanks to DharmaTurtleSC on Reddit for this quick and easy solution to an obvious oversight by Microsoft.

[Original Reddit Post]
[Travis Hiland]


Click View > Macros. Enter anything as the name. 
Click Create. Paste this code:
Sub ThesaurusToggle()
On Error GoTo OpenT
CommandBars("Thesaurus").Visible = Not (CommandBars("Thesaurus").Visible)
GoTo EndIt
OpenT:
Application.Run MacroName:="Thesaurus"
EndIt:
End Sub
Close the window.


Click File > Options > Customize Ribbon > Keyboard Shortcuts: Customize
Scroll to the bottom, click Macros > Thesaurus Toggle > Hit "Shift+F7" in the box > Assign > Close > OK.
That's it!


Step 1:

Step 2:
[Travis Hiland]

No comments:

Post a Comment