Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2021, 04:33 PM
jec1 jec1 is offline Context Menus - Can I have more than 1 dynamic menu Word? Windows 7 32bit Context Menus - Can I have more than 1 dynamic menu Word? Office 2013
Advanced Beginner
Context Menus - Can I have more than 1 dynamic menu Word?
 
Join Date: Jan 2012
Posts: 84
jec1 is on a distinguished road
Smile Context Menus - Can I have more than 1 dynamic menu Word?

Windows 10 Office 365 (Business Standard)

Hi, it has been quite a while since I did this context menu and I would like to have more than 1 dynamic menu (context menu right click) - The macros work except when I add a second dynamic menu which does not show and the Custom XML is well formed.

Does anyone know if I can run more than 1 dynamic context menu please? It does not have to be case select as in the original dynamic menu. I just want more than 1 dynamic menu on the right click.

It will just contain another set of Templates or Macros and be:

rxRS1
rxRS2
rxRS3



I attach a word document with the vba and a page break and the Custom XML (well formed).

It may be just a simple NO you can't.


Many thanks
Reply With Quote
  #2  
Old 07-18-2021, 04:20 PM
Guessed's Avatar
Guessed Guessed is offline Context Menus - Can I have more than 1 dynamic menu Word? Windows 10 Context Menus - Can I have more than 1 dynamic menu Word? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I haven't done this myself as yet so I'll be doing some experimenting on this but is there a reason you wanted a second dynamic menu instead of doing it all in one menu? It is dynamic after all.

If you experiment with the order the menus are called, does rxRS2dynamicMenuContent load if it is called first? Does that then preclude the other one from loading?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 07-18-2021, 06:40 PM
Guessed's Avatar
Guessed Guessed is offline Context Menus - Can I have more than 1 dynamic menu Word? Windows 10 Context Menus - Can I have more than 1 dynamic menu Word? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Ohh, I see what you have done. You CAN have more than one dynamic menu but you probably CAN'T have more than one section for the context trigger. This bit is where I believe you went wrong. See below for your current Ribbon code structure.
Code:
<contextMenu idMso="ContextMenuText">
  <dynamicMenu id="rxRS1DynamicMenu1" label= "MACROS"  getContent="rxRS1dynamicMenuContent" insertBeforeMso="Cut"/>					
</contextMenu>
'... lots of code
<contextMenu idMso="ContextMenuText">
  <dynamicMenu id="rxRS2DynamicMenu1" label= "NUMBERING" getContent="rxRS2dynamicMenuContent" insertBeforeMso="Cut"/>
</contextMenu>
What you should have is:
Code:
<contextMenu idMso="ContextMenuText">
  <dynamicMenu id="rxRS1DynamicMenu1" label= "MACROS"  getContent="rxRS1dynamicMenuContent" insertBeforeMso="Cut"/>					
  <dynamicMenu id="rxRS2DynamicMenu1" label= "NUMBERING" getContent="rxRS2dynamicMenuContent" insertBeforeMso="Cut"/>
</contextMenu>
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 07-18-2021, 08:15 PM
jec1 jec1 is offline Context Menus - Can I have more than 1 dynamic menu Word? Windows 7 32bit Context Menus - Can I have more than 1 dynamic menu Word? Office 2013
Advanced Beginner
Context Menus - Can I have more than 1 dynamic menu Word?
 
Join Date: Jan 2012
Posts: 84
jec1 is on a distinguished road
Smile Dynamic Context Menu

Hi Guessed

I did this way back... but the right click has limits you can only have 10 (or less) and a second menu (Letter Fax) - that's it. They way I've written it anyway.

Case select is great for a few users who have different templates and macros.

I normally do my macros on an addin with split buttons (drop downs) but lately the virus programs seem to dislike the vba code in my addin so I thought I would make some changes.

I will try your suggestion and let you know - I thought I had it working but then it wasn't:
<contextMenu idMso="ContextMenuText">
<dynamicMenu id="rxRS1DynamicMenu1" label= "MACROS" getContent="rxRS1dynamicMenuContent" insertBeforeMso="Cut"/>
<dynamicMenu id="rxRS2DynamicMenu1" label= "NUMBERING" getContent="rxRS2dynamicMenuContent" insertBeforeMso="Cut"/>
</contextMenu>\\

Many thanks for taking a look.
Reply With Quote
  #5  
Old 07-18-2021, 09:01 PM
jec1 jec1 is offline Context Menus - Can I have more than 1 dynamic menu Word? Windows 7 32bit Context Menus - Can I have more than 1 dynamic menu Word? Office 2013
Advanced Beginner
Context Menus - Can I have more than 1 dynamic menu Word?
 
Join Date: Jan 2012
Posts: 84
jec1 is on a distinguished road
Thumbs up Context Menu - Perfect Answer

Quote:
Originally Posted by Guessed View Post
Ohh, I see what you have done. You CAN have more than one dynamic menu but you probably CAN'T have more than one section for the context trigger. This bit is where I believe you went wrong. See below for your current Ribbon code structure.
Code:
<contextMenu idMso="ContextMenuText">
  <dynamicMenu id="rxRS1DynamicMenu1" label= "MACROS"  getContent="rxRS1dynamicMenuContent" insertBeforeMso="Cut"/>					
</contextMenu>
'... lots of code
<contextMenu idMso="ContextMenuText">
  <dynamicMenu id="rxRS2DynamicMenu1" label= "NUMBERING" getContent="rxRS2dynamicMenuContent" insertBeforeMso="Cut"/>
</contextMenu>
What you should have is:
Code:
<contextMenu idMso="ContextMenuText">
  <dynamicMenu id="rxRS1DynamicMenu1" label= "MACROS"  getContent="rxRS1dynamicMenuContent" insertBeforeMso="Cut"/>					
  <dynamicMenu id="rxRS2DynamicMenu1" label= "NUMBERING" getContent="rxRS2dynamicMenuContent" insertBeforeMso="Cut"/>
</contextMenu>

Thank you works now and I can still use Case Select.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add item to context menu for a specific workbook coffent Excel Programming 8 12-25-2020 09:33 AM
Context Menu Unavailable | Project Pro | Team Planner View JKIT Project 0 12-14-2020 11:28 AM
Powerpoint 2016 RC context menu after update AdamC PowerPoint 0 06-26-2017 11:12 AM
Modify right-click context menu to only allow pasting text derajlance Word VBA 0 05-24-2016 02:25 PM
Call for votes: office 2013 Autocorrect & right click (context menu) franklekens Word 0 09-20-2013 12:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft