quotation marks

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
 
G

Greg Maxey

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
 
H

Herb Tyson [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top