Written by Allen Wyatt (last updated August 16, 2025)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365
Normally, you add parentheses around your parenthetical remarks as you type your text. There may be times, however, when you want to add the parentheses at a later time. For instance, while editing your document you may select some text and then want parentheses added around the selected text. The following macro, AddParens, can be used to add the desired parentheses:
Sub AddParens() Dim sTemp As String sTemp = Right(Selection.Range.Text, 1) If sTemp = Chr(13) Or sTemp = " " Then Selection.MoveEnd Unit:=wdCharacter, Count:=-1 End If If Len(Selection.Range) > 0 Then Selection.InsertBefore "(" Selection.InsertAfter ")" Else MsgBox "No text was selected!" End If End Sub
The macro first checks to see if the selected text ends in a space or a hard return. If that is the case, then the selection is modified so those characters aren't included. It then uses the InsertBefore and InsertAfter methods to add the appropriate parenthesis before and after the selected text.
To use the macro, assign it to a shortcut key or to a toolbar button. You then select the target text and invoke the macro. The desired parentheses are added to the text. (If you don't select any text before invoking the macro, you'll see a message box to that effect.)
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11920) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Adding Parentheses.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!
When you select text with the mouse, Word usually selects entire words for you. If you don't want to do this, you can use ...
Discover MoreDo you want Word to always capitalize the first letter appearing after a colon? The program won't do it by default, but ...
Discover MoreSome people like to have one space between sentences, while others prefer two. For those in the latter camp, you may ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments