+ Reply to Thread
Results 1 to 8 of 8

Word Right Click Menu

  1. #1
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Word Right Click Menu

    I am looking for right click menu in Word - to add menu item on the existing right click menu.

    Does any one have it availaible? That will be of immense help.

    I found it here
    https://stackoverflow.com/questions/...-2016-the-code

    But this will remove existing menu and add a new menu item.

    I wanted to add as a new line on the bottom of existing menu item. Also, if possible to make it only for one word document. The way it is now, this will have the right click menu changed for all word documents open when the one with code is running.
    If you think someone helped you, click on the "* Add Reputation" as a way to say thank you.

    If your problem is solved, go to Thread Tools and select Mark This Thread Solved

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Word Right Click Menu

    I seriously doubt that you can make this change for one document. because messing around with Windows handlers and source code that creates an actual application like Microsoft word does not apply to some objects, which is what I call them, for instance a word document that's opened by the application. Furthermore, the poster on stack overflow says that it's a configuration problem and I seriously doubt that as well. Why would configurations in a Microsoft office program cause an error in code that's included in the program naturally anyway?

  3. #3
    Registered User
    Join Date
    08-13-2020
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    78

    Re: Word Right Click Menu

    Thanks for the info Adam and the explanation

  4. #4
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Word Right Click Menu

    Adam,

    I am not an expert but I know that in VBA Excel you can easily have similar feature - using the
    Please Login or Register  to view this content.
    which will let you have the right click menu on one workbook and NOT another - both open at the same time.

    So, I believe there should be something similar for word as well. This is based on the assumption that both being Microsoft product BUT accept that I could be wrong here.

  5. #5
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Word Right Click Menu

    Quote Originally Posted by chaliseyp View Post
    Thanks for the info Adam and the explanation
    well hey, you're welcome! but I have always said, to my clients and to everyone else that seeks help from me....what I say doesn't necessarily mean that I'm right. all it means is that my words could possibly provide value for the person asking the question. and if it does, I expect them to take my words and use them to help find their own answers.

    Quote Originally Posted by saravnepali View Post
    Adam,
    I am not an expert but I know that in VBA Excel you can easily have similar feature - using the
    Please Login or Register  to view this content.
    which will let you have the right click menu on one workbook and NOT another - both open at the same time.
    well, more than likely ms word has similar events for objects like docs, like excel does for sheets. only makes sense. because object models for all office programs are extremely similar. not to mention the fact that all office programs are extremely similar in their operation and purpose.

    if you want to see what a .docx object has to offer, see here: https://docs.microsoft.com/en-us/off.../word.document

    furthermore, see here and here:

    https://docs.microsoft.com/en-us/off...ument.activate

    https://docs.microsoft.com/en-us/off...indow.activate

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Word Right Click Menu

    If the right click is for a specific document you can add ribbonx to add contextual menu.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  7. #7
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Word Right Click Menu

    Andy Pope,

    Exactly what I wanted ?

    However, how do you customise it ?
    And, it works for right click on the general area on a word document BUT not on a table OR in a heading etc.

    Is there a way to make it work on this case too ?

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Word Right Click Menu

    You need to edit/add ribbonx xml to the document.
    You would need to add controls to all the relevant right click menus. There is not 1 contextual menu item.

    You can use the same callback and within the code check control id to determine action if different depending on context

    More detail can be found here,
    https://www.rondebruin.nl/win/s2/win014.htm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom Right Click Menu and Sub-menu (disable inbuilt right click menu item)
    By analystbank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2020, 04:27 AM
  2. Replies: 5
    Last Post: 02-17-2017, 04:50 PM
  3. Add divider lines and sub-menu to right-click menu
    By ChrisXcel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2014, 07:48 PM
  4. A macro to right click a cell and select a item from the right click menu?
    By Peavey in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2014, 10:55 AM
  5. Right-Click Menu
    By akq125 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-06-2011, 02:30 PM
  6. Excel left click produces right click menu
    By Shoesuntied in forum Excel General
    Replies: 4
    Last Post: 08-18-2006, 01:20 PM
  7. Add menu item to right-click menu
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2006, 05:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1