Right mouse button menu

P

Peter

How do I change/add items to the menu that comes upo when you press the
right mouse button in Word 2002?

Thank you

Peter
 
J

Jay Freedman

Peter said:
How do I change/add items to the menu that comes upo when you press
the right mouse button in Word 2002?

Thank you

Peter

Open the Tools > Customize dialog and click the Toolbars tab. Put a check
next to Shortcut Menus. This displays a floating toolbar at the upper left
with entries Text, Table, and Draw. Click one of those entries to get a list
of right-click menus, some of which have submenus. Each of these represents
a right-click menu that appears when the cursor is in a particular type of
text, table, or drawing object.

Now click the Commands tab of the Customize dialog and drag items to the
(usually several) shortcut menus where you want them to appear.

Illustrated procedure is at
http://word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm.
 
P

Pat Garard

G'Day Peter,

I have done this with VBA in Excel (Office 97), but not
in Word.

Even then I confined myself to Worksheets where, from
memory, there were only three menus:
ShortCut Menu for Rows - CommandBars(27)
ShortCut Menu for Columns - CommandBars(26)
ShortCut Menu for Cells - CommandBars(25)

There are about 130 CommandBar objects in Word,
and I think well over half are ShortCut menus that fire up
depending on the object that was Right-Clicked.

If you were looking for a neat trick - there isn't one! If
you want to get into the VBA, you will have to locate the
resources yourself. A good start might be
http://word.mvps.org/FAQs/MacrosVBA/index.htm.

Good Luck!
 
P

Peter

Thanks everybody

Now for the next step.

What I wanted to do was to get "Paste special" in the shortcut menu in the
mouse right button.

I have done it. When I click on Paste Special a box opens with a choice of
items and starts with "HTML Format".

How can I get it to open with ?Unformatted text" ?


Thanks for your help


Peter
 
J

Jay Freedman

Hi Peter,

Watch out, that next step is a doozy!

There's no way to preset the Paste Special dialog to Unformatted Text.
You might think you could record a macro, or write one that uses
SendKeys to simulate pressing the arrow key to get the choice. That
frequently won't work properly, because the contents of the list
depend on the contents of the clipboard at the time you open the
dialog. For instance, if a picture is on the clipboard or if the
clipboard is empty, there won't be any Unformatted Text choice in the
list.

What you can do instead is to install the following macro in
Normal.dot or another global template (see
http://www.gmayor.com/installing_macro.htm), and then assign the macro
to the shortcut menu. If the clipboard contains text that can be
pasted unformatted, the macro will do it without showing the dialog;
if the clipboard can't be pasted unformatted, you won't see anything
happen (because of the On Error statement).

Sub PasteSpecialUnformatted()
On Error Resume Next
Selection.PasteSpecial DataType:=wdPasteText
End Sub
 
P

Peter

Thanks Jay.




Jay Freedman said:
Hi Peter,

Watch out, that next step is a doozy!

There's no way to preset the Paste Special dialog to Unformatted Text.
You might think you could record a macro, or write one that uses
SendKeys to simulate pressing the arrow key to get the choice. That
frequently won't work properly, because the contents of the list
depend on the contents of the clipboard at the time you open the
dialog. For instance, if a picture is on the clipboard or if the
clipboard is empty, there won't be any Unformatted Text choice in the
list.

What you can do instead is to install the following macro in
Normal.dot or another global template (see
http://www.gmayor.com/installing_macro.htm), and then assign the macro
to the shortcut menu. If the clipboard contains text that can be
pasted unformatted, the macro will do it without showing the dialog;
if the clipboard can't be pasted unformatted, you won't see anything
happen (because of the On Error statement).

Sub PasteSpecialUnformatted()
On Error Resume Next
Selection.PasteSpecial DataType:=wdPasteText
End Sub
 

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