How do I quickly add quotation marks?

  • Thread starter Thread starter tgriffin
  • Start date Start date
T

tgriffin

I'd like to highlight a phrase and then use a keystroke to add quotation
marks at the beginning and end of the phrase (Often I put quotes around just
one or two words)
 
Seems like it takes more mouse-manipulation to highlight a phrase than
to simply type the quotation marks at the beginning and end?
 
Whether or not you agree with Peter, what you requested is easily achieved
with a macro attached to a toolbar button or keyboard shortcut. As you have
not indicated which quotes you wish to add, the following macro can easily
be adapted to use single or double, smart or straight quotes by removing the
apsotrophe from start of the relevant line to the start of the currently
active line. You'll see what I mean when you paste it to the vba editor.

Sub AddQuotes()
Dim oRng As Range
Set oRng = Selection.Range
'Double smart quotes
oRng.Text = Chr(147) & oRng.Text & Chr(148)
'Double straight quotes
'oRng.Text = Chr(34) & oRng.Text & Chr(34)
'Single smart quotes
'oRng.Text = Chr(145) & oRng.Text & Chr(146)
'Single straight quotes
'oRng.Text = Chr(39) & oRng.Text & Chr(39)
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top