Can't find idMso for Picture... button on ContextMenuInlinePicture

John Desrosiers 1 Reputation point

In a Word .doc in compatibility mode I'm specifically looking to hook the Picture... button shown. This is an inline image.

It isn't idMso="PictureFormatDialog" and I've tried a few dozen likely guesses with no luck.

I'm sure my XML is valid since I can modify the behavior of any other control in ContextMenuInlinePicture.

Any ideas?


Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,698 questions
Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
907 questions
{count} votes

5 answers

Sort by: Most helpful
  1. John Korchok 5,161 Reputation points

    Here's the GitHub page where you can download the all the Fluent UI Control ID spreadsheets from Microsoft. You should be able to find the idMso in the wordcontrols file for your version of Office:

    1 person found this answer helpful.

  2. Hung-Chun Yu 976 Reputation points Microsoft Employee

    Hi @John Desrosiers

    I went to the source code directly. I found the following entry.

    <Tcid Name="msotcidCtxUIInlinePicture">

    Hence, I think the answer you are looking for would be "msotcidCtxUIInlinePicture" Let me know if this helped.

    Hung-Chun Yu
    Microsoft Open Specifications Support

  3. Stefan Blom 2,146 Reputation points MVP

    The Picture command on the Inline Picture right-click menu has the command ID 2327.

    Where do you want to add this command?

  4. John Korchok 5,161 Reputation points

    While you could completely hide the icon, it's considerably easier to simply disable it when a selected image is not the right type. To do this, you'll have to use a getEnabled command in the XML for the Inline Image button. That getEnabled command will link to a macro that uses the WindowSelectionChange event.

    The way this works is that the event listener checks the selection every time it changes. When it runs this check, it gets whether the selected item is a picture. Then, if it is, it looks for the picture type. If the picture type is correct, then getEnabled status for the icon is changed, disabling it for wrong picture types and enabling it for the ones you want.

    There's a learning curve for this. Searching on Word ribbon getenabled and Word WindowSelectionChange event will get you pages that explain the process in detail.

  5. Oskar Shon 866 Reputation points MVP

    That can be: ChartStylesGallery


    0 comments No comments