getDescription

 

Description

Sets the description for a Ribbon Control.










Sample Ribbon XML file:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="CallbackOnLoad">
    <ribbon startFromScratch="false">
        <tabs>
            <tab id="MyTab" label="Button Demo">
                <group id="MyGroup" label="Button Demo">
                    <labelControl id="myLabel1" label="Sample:" />
                    <labelControl id="myLabel2" label="Menu" />
                        <menu id="MyMenu" label="Sample Menu"
                          itemSize="normal">
                            <menuSeparator id="Myseparator1"/>
                            <menu id="MyMenuNextLevel1" label="More"
                              itemSize="normal">
                                <button idMso="Cut"/>
                                <button idMso="Copy"/>
                                <button idMso="Paste"/>
                                <menuSeparator id="mySeparator2" 
                                  getTitle="CallbackGetTitle"/>
                                    <menu id="MyMenuNextLevel2" 
                                      label="Big items" 
                                      itemSize="large">
                                        <button id="MyBtn1a" 
                                            getDescription="CallbackGetDescription"/>
                                        <button id= "MyBtn2a" 
                                          getDescription="CallbackGetDescription"/>
                                        <menuSeparator id="mySeparator3"/>
                                        <dynamicMenu id="MyDynamicMenu" 
                                          label="Sub Menu"
                                          getContent="CallbackGetContent"/>
                                        <button id="dynaButton" label="Button" 
                                          onAction="MyButtonCallbackOnAction" 
                                          imageMso="HappyFace"/>
                                    </menu>
                            </menu>
                     </menu>
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

Function to be copied to a standard module:

Sub CallbackGetDescription(control As IRibbonControl, _
                           ByRef description)
    ' Control Description
    Select Case control.ID
        Case "MyBtn1a"
            description = "Hello i am a description"
        Case "MyBtn2a"
            description = "Hello i am a description too"
    End Select
End Sub



You can find this sample in Sample DB 2

 

Back