I found in the manual that you need to create a custom wpa in order interact with a custom toolbar button. I think I have done everything correctly, but it is not disabling them.
Here are my custom actions:
<wpa>
<action name="DiaSaveTemplate" c="Save Template" h="Save the letter template (CTRL+S)"/>
<action name="DiaSaveLetter" c="Export Template" h="Export merged letter to MS Word"/>
</wpa>
Here is my toolbar entry:
<Button image="30" wpa="DiaSaveTemplate" name="DiaSaveTemplate" hint="Save the letter template (CTRL+S)"/>
<Button image="37" wpa="DiaSaveLetter" name="DiaSaveLetter" hint="Export merged letter to MS Word"/>
I have a button (wpa="diaPrint") that is disabling and enabling properly, so I know it is working overall.
I have confirmed that the wpaGetID is getting an ID (255 and 256 respectively.) I have also confirmed that the system can read both the wpa and the name because I did a wpaGetID(thebuttons.Name)
Here is my actual OnUpdateGui code:
Dim wpaButton As Integer
Set memo = WPDLLInt1.memo
Select Case Me.MergeTab
Case 0 'Template
wpaButton = WPDLLInt1.wpaGetID("DiaSaveTemplate")
WPDLLInt1.wpaSetFlags Editor, wpaButton, 1, "A"
wpaButton = WPDLLInt1.wpaGetID("DiaSaveLetter")
WPDLLInt1.wpaSetFlags Editor, wpaButton, 1, "@"
wpaButton = WPDLLInt1.wpaGetID("DiaPrint")
WPDLLInt1.wpaSetFlags Editor, wpaButton, 1, "@"
****
I know it works because the "DiaPrint" button is working just fine.
What am I missing?