Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and 2021. 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: Replacing Quoted Text with Italics.
Written by Allen Wyatt (last updated January 9, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and 2021
In many word processors, an author may call out material with quote marks. For instance, the first time a term is introduced, the author may enclose the term in quote marks. In Word, however, you can call out information with italics. Manually changing quoted material to italics can be very time consuming.
The following macro, QuotesToItalics, checks the current paragraph for quoted material. If there is any, it deletes the quotes and changes the text between the quotes to italics. If the quote marks are unbalanced (there is an opening or closing quote mark with no corresponding closing or opening quote mark), then the quote mark is ignored, and no changes are made. The macro works with either regular quotes or smart quotes.
Sub QuotesToItalic()
Dim Redo As Boolean
Dim Ptr As Integer
Dim Ptr1 As Integer
Dim P As String
Dim P1 As String
If Selection.ExtendMode Then Exit Sub
Redo = True
While Redo
Selection.StartOf Unit:=wdParagraph, Extend:=wdMove
Selection.MoveEnd Unit:=wdParagraph
P = Selection.Text
Ptr = InStr(P, Chr(34))
If Ptr = 0 Then Ptr = InStr(P, Chr(147))
If Ptr > 0 Then
Selection.MoveLeft Unit:=wdCharacter, Extend:=wdMove
Selection.MoveRight Unit:=wdCharacter, Count:=Ptr
Selection.MoveEnd Unit:=wdParagraph
P1 = Selection.Text
Ptr1 = InStr(P1, Chr(34))
If Ptr1 = 0 Then
Ptr1 = InStr(P1, Chr(148))
EndChar = Chr(148)
Else
EndChar = Chr(34)
End If
If Ptr1 > 0 Then
Selection.MoveLeft Unit:=wdCharacter, Count:=2, _
Extend:=wdMove
Selection.Delete Unit:=wdCharacter
Selection.MoveRight Unit:=wdCharacter, _
Count:=Ptr1 - 1, Extend:=wdExtend
Selection.Font.Italic = True
Selection.MoveRight Unit:=wdCharacter, Extend:=wdMove
Selection.Delete Unit:=wdCharacter
Else
Selection.MoveRight Unit:=wdCharacter, Extend:=wdMove
Redo = 0
End If
Else
Selection.MoveRight Unit:=wdCharacter, Extend:=wdMove
Redo = 0
End If
Wend
End Sub
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 (9502) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Word here: Replacing Quoted Text with Italics.
Do More in Less Time! An easy-to-understand guide to the more advanced features available in the Microsoft 365 version of Word. Enhance the quality of your documents and boost productivity in any field with this in-depth resource. Complete your Word-related tasks more efficiently as you unlock lesser-known tools and learn to quickly access the features you need. Check out Microsoft 365 Word For Professionals For Dummies today!
Want to adjust the pitch of your text? The answer depends on what, exactly, is meant by "pitch." This tip looks at the ...
Discover MorePart of the formatting you can add to your text is underlining. That simple word (underlining) represents quite a few ...
Discover MoreIf formatting of your text isn't done correctly, it can lead to some weird results in a TOC generated by Word. This tip ...
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