none
idmso supplied for Shapes not working RRS feed

  • Question

  • Hi,

    i am working on a word custom ribbon ui. I would like to set enabled =false on Shapes

      <commands>
        <command idMso="GalleryAllShapesAndCanvas" getEnabled="GetEnabled"/>
      </commands>

      <commands>
        <command idMso="GalleryAllShapesAndCanvas" onAction="MyOnAction"/>
      </commands>

    Do not work

    latest word 2007 document shows :

    Control Name Control Type Tab Set Tab Group/Context Menu Name Parent Control Secondary Parent Control Tertiary Parent Control Policy ID Ordering

    GalleryAllShapesAndCanvas gallery None (Core Tab) TabInsert GroupInsertIllustrations 15287 174
    DrawingCanvasInsert button None (Core Tab) TabInsert GroupInsertIllustrations GalleryAllShapesAndCanvas 5811 175

    Any Help will be appreciated



    Tuesday, January 29, 2013 3:16 PM

Answers

  • Hi Reggie

    It's not possible to assign onAction to a control of the type "gallery". I'm surprised you don't get a warning when Word tries to load this Ribbon XML. Do you have [Office BUtton]/Options/Advanced/ Show add-in user interface errors activated?

    As far as I know, it should be possible to change the enabled attribute / use getEnabled to change that state. Do you see anything different after removing the onAction assignment for the control? Or do you now get an error? How about if you test using enabled instead of getEnabled?


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, January 29, 2013 6:29 PM
    Moderator
  • Hi Reggie

    This Ribbon XML works just fine for me. Please note that my testing environment was Word 2010 - the "Shapes" button is disabled.

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    	<commands>
    		<command idMso="GalleryAllShapesAndCanvas" enabled="false" />
    	</commands>
    </customUI>


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, January 30, 2013 3:17 PM
    Moderator
  • Hi Reggie

    OK, I fired up an old machine with Word 2007 on it and it appears this is a "limitation" of Office 2007. It simply does not work in Word 2007.

    The only thing I can suggest is to make the built-in GROUP Illustrations invisible, then create your own group without that control.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, January 31, 2013 8:55 AM
    Moderator

All replies

  • Hi Reggie

    It's not possible to assign onAction to a control of the type "gallery". I'm surprised you don't get a warning when Word tries to load this Ribbon XML. Do you have [Office BUtton]/Options/Advanced/ Show add-in user interface errors activated?

    As far as I know, it should be possible to change the enabled attribute / use getEnabled to change that state. Do you see anything different after removing the onAction assignment for the control? Or do you now get an error? How about if you test using enabled instead of getEnabled?


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, January 29, 2013 6:29 PM
    Moderator
  • I wantred to show all the ways i tried

    enabled 

    getenabled

    onaction

    all 3 dont work for this control id and there are no errors for them.

    and NO to this question:

    do you have [Office BUtton]/Options/Advanced/ Show add-in user interface errors activated?

    thanks

    Tuesday, January 29, 2013 7:14 PM
  • Well, please activate that option, then test enabled and see what you get.

    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, January 29, 2013 7:58 PM
    Moderator
  • tested and i get nothing
    Tuesday, January 29, 2013 9:27 PM
  • Hi Reggie

    This Ribbon XML works just fine for me. Please note that my testing environment was Word 2010 - the "Shapes" button is disabled.

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    	<commands>
    		<command idMso="GalleryAllShapesAndCanvas" enabled="false" />
    	</commands>
    </customUI>


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, January 30, 2013 3:17 PM
    Moderator
  • Yes but my environment is Word 2007. Someone please help.
    Thursday, January 31, 2013 12:42 AM
  • Hi Reggie

    OK, I fired up an old machine with Word 2007 on it and it appears this is a "limitation" of Office 2007. It simply does not work in Word 2007.

    The only thing I can suggest is to make the built-in GROUP Illustrations invisible, then create your own group without that control.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, January 31, 2013 8:55 AM
    Moderator