View Single Post
 
Old 03-19-2023, 04:20 PM
Italophile Italophile is online now Windows 11 Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

You should get yourself a copy of RibbonX: Customizing the Office 2007 Ribbon.

getPressed and getEnabled do very different things so the code should definitely not be the same.

Here is an example of how getPressed is used.

Code:
Public Sub getPressed(control As IRibbonControl, ByRef returnedVal)
    'callback for toggle button that turns ShowPicturePlaceholders on / off
    returnedVal = ActiveDocument.ActiveWindow.View.ShowPicturePlaceHolders
End Sub
Your DocumentChange event should check whether the active document is based on your template and, if so, refresh the ribbon.
Reply With Quote