You are here:   customUI - loadImage

customUI - loadImage

 

LoadImageThe callback loadImage determines what function should be used for loading pictures for all controls.

In case you want to change pictures dynamically you have to use the callback getImage, as loadImage will not be run during InvalidateControl "ControlID" and Invalidate.


This function submits the contents of Control Parameter "image" and expects the IPictureDisp Object in return.


Sample Ribbon XML file: 

 

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" loadImage="CallbackLoadImage"> 
    <ribbon startFromScratch="false"> 
        <tabs> 
            <tab> 
                <group>
                    <!-- Further XML Code -->
                    <button id="MyButton" image="myImage.JPG"/> 
                </group> 
            </tab>
        </tabs> 
    </ribbon>
</customUI>  

Function to be copied to a standard module:

Sub CallbackLoadImage(imageID As String, _
                     ByRef image)
    ' Callback loadImage 
    Set image = LoadPicture(getAppPath & imageID)
End Sub

 

 

 

 

Back


Last Updates:

18.03.2021
New Download added. ...

25.10.2018
Update Site "Trusted Locations" ...

22.10.2018
New Download added. ...

08.04.2018
IDBE RibbonCreator 2016 (x86 and x64) for Office 2013 and Office 2016 - new release. ...

 

Last update: