quotation marks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a quick way to add quotation marks to a word, paragraph etc.? I
would like to be able to highlight a section and with one click or a hot key
add opening and closing marks when I forget to use them. It takes several
steps to click by the beginning, type the marks, then click at the end and
type them again. If there is nothing like that, I wish someone would invent
it. Using Office Word in Windows XP
 
Here are a couple of macros I threw together that might get you started.
Assign either to a keyboard shortcut. See:
http://word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm


Sub Macro1()

Dim mySelection As String
mySelection = Selection.Text
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = mySelection
.Replacement.Text = """^&"""
.Forward = True
.Wrap = wdFindStop
.Execute Replace:=wdReplaceOne
End With
End Sub

Sub Macro2()
Dim myRng As Range
Set myRng = Selection.Range
If myRng.Characters.Last = Chr(13) Then myRng.MoveEnd wdCharacter, -1
With myRng
.InsertBefore """"
.InsertAfter """"
End With
End Sub
 
Nothing built-in. But, here's a macro I wrote a while back that does it:

Sub QuoteIt()
'
' BracketIt Macro
' Macro recorded August 9, 2000 by Herb Tyson
'
Selection.Copy
Selection.TypeText Text:=Chr$(147) + Chr$(148)
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Paste
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub


This inserts curved quotes. If you want ditto marks (""), you can modify the
Chr$(147)+Chr$(148) as needed.
 
Back
Top