Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, and 2013. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Adding Quotes.
by Allen Wyatt
(last updated November 29, 2014)
Normally, you add quote marks to your text as you type. There may be times, however, when you want to add the quote marks at a later time. For instance, while editing your document you may select some text and then want quote marks added around the selected text. You can accomplish this task with the following macro:
Sub AddQuotes() Dim sBegQ As String Dim sEndQ As String If Options.AutoFormatAsYouTypeReplaceQuotes Then sBegQ = Chr(147) sEndQ = Chr(148) Else sBegQ = Chr(34) sEndQ = Chr(34) End If Selection.InsertBefore sBegQ Selection.InsertAfter sEndQ End Sub
The macro determines the proper type of quote marks to use, based on whether you have Word's SmartQuotes turned on or not. The proper quotes are then placed before and after the selection.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13326) applies to Microsoft Word 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Word here: Adding Quotes.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Sometimes a strange object or text may appear in your document, as happened to Sharon. To complicate the situation, her ...Discover More
Dragon Naturally Speaking is a very popular transcription tool that converts speech into text. When using the program ...Discover More
Section marks are used regularly in the writings of some industries, such as in legal documents. If you need a way to ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.