Automatic quotations

R

rog77

Hello. Please excuse me for posing what probably is a very basic
question, but I was wondering if Word has a feature where you could
select text and apply opening and closing quotes to it with one
keystroke or menu command.

If anyone knows anything about this, I would appreciate a reply very
much. Thank you.

Sincerely,

rog77
 
J

J.E. McGimpsey

Gene van Troyer said:
Nice! Thanks! Now, how do you create an icon for macros that you can add to
a toolbar? Just dragging the macro to the toolbar places a text designation
(Normal.module1.QuoteIt) in the toolbar, which is a highly unaesthetic, know
what I mean?

CTRL-click on the text button and choose Properties. Select "Default
Style" from the View: dropdown

You can then choose an icon from the icon dropdown, or you can copy
a picture and paste it.

You might also be interested in one of the thousands of built-in
icons in Office (well, hundreds, probably - many are duplicated).
John Walkenbach has an XL macro which will display them (use the
ShowFaceID's macro - the downloadable macros don't work in MacXL):

http://j-walk.com/ss/excel/tips/tip40.htm

You can copy them, or, if you know the face ID number, you can use
the VBE's immediate window:

Commandbars("mybar").Controls("mymacro").FaceID = 266
 
G

Gene van Troyer

You might also be interested in one of the thousands of built-in
icons in Office (well, hundreds, probably - many are duplicated).
John Walkenbach has an XL macro which will display them (use the
ShowFaceID's macro - the downloadable macros don't work in MacXL):

Thanks for the tip!

Gene
 
R

rog77

J.E. McGimpsey said:
There's nothing, AFAIK, built into Word that will do this. Welcome
to the world of macros!

Here's a very simple way to apply quotes to a selection:

Public Sub QuoteIt()
With Selection
.Text = """" & .Text & """"
End With
End Sub

You can enter this by typing OPTION-F11 to enter the Visual Basic
Editor. Select the Normal Template in the project browser window on
the left, then choose Insert/Module. Paste the above into the window
that opens. Type Option-F11 again to return to Word.

To assign a keystroke shortcut, choose Tools/Customize and click on
the Keyboard button. Select Macros in the Categories listbox, then
choose Quoteit in the Macros listbox. Enter a key combination in the
Press a new shortcut key: textbox (XL will tell you if that combo is
already assigned), click on Assign, then OK, OK.

Wow! It worked!! Thank you very much for the great tip. This was my first macro!

Sincerely,

rog77
 
J

J.E. McGimpsey

Wow! It worked!! Thank you very much for the great tip. This was my first
macro!

Great! Now make sure you keep a backup of your Normal template so
that you don't lose it if Normal becomes corrupted.
 

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