We are a group of users of Blackbaud products and are not affiliated with Blackbaud. We'd love to have you join our community to help and be helped in getting the most from your Blackbaud software.
Register now to join us to get independant advice on your system, connect with 3rd party consultants to help you maximize your database and have a real alternative to the official Blackbaud website.
We've upgraded to 7.83 and I'm wanting to add buttons to launch macros (such as the 'Show Googlemap' macro I received such great help with earlier).
IBBMacroProperties seems to be the way to do it, but I really have not idea how it works even after reading the extensive documentation: "Implement this interface in a VBA macro to set-up a customized toolbar button"
Has anyone got any suggestions? I suspect I need to run it when someone logs in to add the custom toolbar button but the rest remains a mystery...
I was hoping to create a routine which could be given a macro name, a description and an image path and add it to the toolbar.
Here's all I have so far (and I'm embarrassed to post it but here goes)
Code:
Public Sub AddMacroButton(strName As String, strDescription as String, strImagePath As String)
Dim oButton As IBBMacroProperties
'Set oButton = ??? Something should go in here - not sure what!
oButton.Description = strDescription
oButton.ImageFilePath = strImagePath
oButton.SupportedMetaObjects ' Got this far and ran out of ideas :(
End Sub
The way you use IBBMacroProperties is to implement it in your plugin. It is best placed in a class file or module. I would suggest either on its own or together with the IBBPlugin interface implementation.
I cannot take credit for the following code it came from a Blackbaud support person but it does display the concept succinctly.
Code:
Private Property Get IBBMacroProperties_Description(ByVal sMacroName As String) As String
Select Case UCase(sMacroName)
Case "GETPRIMARYADDRESSBLOCK"
IBBMacroProperties_Description = "Get Address Block"
Case "GETPRIMARYCONTACT"
IBBMacroProperties_Description = "Get Organization Primary Contact"
End Select
End Property
Private Property Get IBBMacroProperties_ImageFilePath(ByVal sMacroName As String) As String
Select Case UCase(sMacroName)
Case "GETPRIMARYADDRESSBLOCK"
IBBMacroProperties_ImageFilePath = "C:VBA CodeToolbarMacrogripBlue.gif"
End Select
End Property
Private Property Get IBBMacroProperties_SupportedMetaObjects(ByVal sMacroName As String) As Variant
Select Case UCase(sMacroName)
Case "GETPRIMARYADDRESSBLOCK"
IBBMacroProperties_SupportedMetaObjects =Array(bbmoCONSTITUENT)
Case "GETPRIMARYCONTACT"
IBBMacroProperties_SupportedMetaObjects =Array(bbmoRELATION_ORGANIZATION)
End Select
End Property
When this first came out the icon and name methods did not work properly. I have not used this is in the latest version so I don't know if that has been fixed or not.