Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    970
    Thanks
    3
    Thanked 13 Times in 12 Posts

    Custom Context Menu

    I've modified context menus successfully in the past using the CustomUI Editor. idMso="ContextMenuText" is what I have worked with.

    I recently needed to customize the right-click context menu, and my code appeared not to work. I realized the paragraph had a Heading style applied, and that seemed to be the sticking point. If the cursor was on a misspelled word, my changes did not appear in the context menu. On a correctly spelled word not in a Heading paragraph, the right-click context menu showed my changes. I found that in addition to ContextMenuText, there was ContextMenuSpell. That solved the issue when right-clicking on a misspelled word. I took a guess and tried ContextMenuHeading... also a success. I had trouble in a table. I tried ContextMenuTable; that didn't provide correct results, but there was no error when I started Word with "Show Add-in User Interface Errors" checked. ContextMenuTables raised an error when Word loaded.

    I would like to find a list of idMso items for Context Menus. Can anyone recommend a source for that?

    Thanks.

  2. #2
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    970
    Thanks
    3
    Thanked 13 Times in 12 Posts
    I continued Googling for this and found the following link which is exactly what I was looking for:
    https://stackoverflow.com/questions/...r-context-menu
    The paragraph that begins "But the best thing...." has a link to download a Word add-in (dotm file) that adds the name of every context menu when a context menu displays. It is compressed in a LZH file, so an extraction utility is required to get to the template. It's worth the download.

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,919
    Thanks
    4
    Thanked 290 Times in 264 Posts
    Good find Richard

    It appears to be much the same as the installable at the bottom of this page https://www.rondebruin.nl/win/s2/win014.htm but it has the added benefit of not needing to be installed so I can get it working on my work machine where mere mortals aren't allowed to run unapproved applications.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    970
    Thanks
    3
    Thanked 13 Times in 12 Posts
    I didn't think to check Ron deBruin's site for this. I Google'd for hours and didn't find anything from Microsoft other than general tips on customizing the Ribbon. Thanks for the link you provided. I had hoped to be able to customize the mini toolbar, but I found on multiple sites that it's not possible. My goal was to underline the word or selection where the cursor is sitting and add curly quotes before and after the text; if the cursor is under a REF field, underline but no quotes. I thought that would be a good addition to the mini toolbar.

Posting Permissions

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