Hi,

Can anybody point me to information that will help work out how to add
additional items to the right click men that appears?

I have the rightclick event being catpured abd can display my own tool bar I
created, but then the default right click word menu still appears after the
commandbar has been dismissed.

What I'd like to do is add my menu items to the default right click menu
that appears. I cannot find any information on how to do this so if anyboyd
knows your assistance is greatly appreciated.

regards

Shane Parkinson

How to add items to Right Click menu by Joost

Joost
Sat Aug 28 15:10:49 CDT 2004


>-----Original Message-----
>Hi,
>
>Can anybody point me to information that will help work
out how to add
>additional items to the right click men that appears?
>
>I have the rightclick event being catpured abd can
display my own tool bar I
>created, but then the default right click word menu
still appears after the
>commandbar has been dismissed.
>
>What I'd like to do is add my menu items to the default
right click menu
>that appears. I cannot find any information on how to do
this so if anyboyd
>knows your assistance is greatly appreciated.
>
>regards
>
>Shane Parkinson
>
Hi Shane, :D

This should do the TRICK!

Double click on ThisDocument (Classmodule) and put in
this code:

Private Sub Document_Close()
On Error Resume Next

CustomizationContext = NormalTemplate
Application.CommandBars("Text").Controls("Name of
you're button").Delete
End Sub

Private Sub Document_Open()
Dim oCtl As CommandBarControl

CustomizationContext = NormalTemplate

Set oCtl = Application.CommandBars("Text").Controls.Add

With oCtl
.Caption = "Name of you're button"
.OnAction = "MacroYouWantToCall"
.BeginGroup = True
End With

Set oCtl = Nothing
End Sub

Have Fun,
Joost Verdaasdonk


Re: How to add items to Right Click menu by Jay

Jay
Sat Aug 28 16:22:31 CDT 2004

Hi Shane,

You can do this without code, unless the target of the menu command
isn't always the same.

In the template that holds your macros and other customizations, add
the menu items to the right-click menus (note that there are many of
them, and which one appears depends on where the user clicked).

The procedure is described here:
http://word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm
Pay special attention to steps 2c and 4, which describe the shortcut
(right-click) menus.

--
Regards,
Jay Freedman http://aspnet2.com/mvp.ashx?JayFreedman
Microsoft Word MVP FAQ: http://word.mvps.org

"shanep" <shanep@sydneygang.com> wrote:

>Hi,
>
>Can anybody point me to information that will help work out how to add
>additional items to the right click men that appears?
>
>I have the rightclick event being catpured abd can display my own tool bar I
>created, but then the default right click word menu still appears after the
>commandbar has been dismissed.
>
>What I'd like to do is add my menu items to the default right click menu
>that appears. I cannot find any information on how to do this so if anyboyd
>knows your assistance is greatly appreciated.
>
>regards
>
>Shane Parkinson
>


Re: How to add items to Right Click menu by shanep

shanep
Sat Aug 28 23:22:31 CDT 2004

Thank Joost, it worked a treat 7 thanks jay for the link, it filled in few
more gaps.

Appreciate your time

Regards
Shane Parkinson
.
"Joost Verdaasdonk" <anonymous@discussions.microsoft.com> wrote in message
news:1f6801c48d3b$1cdaba60$a501280a@phx.gbl...
>
>>-----Original Message-----
>>Hi,
>>
>>Can anybody point me to information that will help work
> out how to add
>>additional items to the right click men that appears?
>>
>>I have the rightclick event being catpured abd can
> display my own tool bar I
>>created, but then the default right click word menu
> still appears after the
>>commandbar has been dismissed.
>>
>>What I'd like to do is add my menu items to the default
> right click menu
>>that appears. I cannot find any information on how to do
> this so if anyboyd
>>knows your assistance is greatly appreciated.
>>
>>regards
>>
>>Shane Parkinson
>>
> Hi Shane, :D
>
> This should do the TRICK!
>
> Double click on ThisDocument (Classmodule) and put in
> this code:
>
> Private Sub Document_Close()
> On Error Resume Next
>
> CustomizationContext = NormalTemplate
> Application.CommandBars("Text").Controls("Name of
> you're button").Delete
> End Sub
>
> Private Sub Document_Open()
> Dim oCtl As CommandBarControl
>
> CustomizationContext = NormalTemplate
>
> Set oCtl = Application.CommandBars("Text").Controls.Add
>
> With oCtl
> .Caption = "Name of you're button"
> .OnAction = "MacroYouWantToCall"
> .BeginGroup = True
> End With
>
> Set oCtl = Nothing
> End Sub
>
> Have Fun,
> Joost Verdaasdonk
>



Re: How to add items to Right Click menu by anonymous

anonymous
Sun Aug 29 12:00:37 CDT 2004

Hi Shane,

You're Welcom! ;-)

>-----Original Message-----
>Thank Joost, it worked a treat 7 thanks jay for the
link, it filled in few
>more gaps.
>
>Appreciate your time
>
>Regards
>Shane Parkinson
>..
>"Joost Verdaasdonk"
<anonymous@discussions.microsoft.com> wrote in message
>news:1f6801c48d3b$1cdaba60$a501280a@phx.gbl...
>>
>>>-----Original Message-----
>>>Hi,
>>>
>>>Can anybody point me to information that will help work
>> out how to add
>>>additional items to the right click men that appears?
>>>
>>>I have the rightclick event being catpured abd can
>> display my own tool bar I
>>>created, but then the default right click word menu
>> still appears after the
>>>commandbar has been dismissed.
>>>
>>>What I'd like to do is add my menu items to the default
>> right click menu
>>>that appears. I cannot find any information on how to
do
>> this so if anyboyd
>>>knows your assistance is greatly appreciated.
>>>
>>>regards
>>>
>>>Shane Parkinson
>>>
>> Hi Shane, :D
>>
>> This should do the TRICK!
>>
>> Double click on ThisDocument (Classmodule) and put in
>> this code:
>>
>> Private Sub Document_Close()
>> On Error Resume Next
>>
>> CustomizationContext = NormalTemplate
>> Application.CommandBars("Text").Controls("Name of
>> you're button").Delete
>> End Sub
>>
>> Private Sub Document_Open()
>> Dim oCtl As CommandBarControl
>>
>> CustomizationContext = NormalTemplate
>>
>> Set oCtl = Application.CommandBars("Text").Controls.Add
>>
>> With oCtl
>> .Caption = "Name of you're button"
>> .OnAction = "MacroYouWantToCall"
>> .BeginGroup = True
>> End With
>>
>> Set oCtl = Nothing
>> End Sub
>>
>> Have Fun,
>> Joost Verdaasdonk
>>
>
>
>.
>