If only we could change Raiser’s Edge in the same way that we can change other applications such as our favourite music players etc.
Well unfortunately I cannot show you a way to do exactly that but there are a few things that can be changed.
Have you ever wanted to rearrange the navigation tabs on the left hand side of Raiser’s Edge? Well this is not too difficult with the VBA module. There are some event hooks that can be written to change them. In the re7vba tool (found in the same directory as RE7.exe) run the RE code Wizard and select CustomFrontEnd.
Once you have done that it is relatively simple to change the wizard code in order to make it work for you. Firstly you need to create a module in order to store the value of mlStartItemOffset
. This is simply a public variable that the two methods that were created will use. It stores the current item number as it goes through your items and the Blackbaud items.
You can choose to retain the existing items or replace with your own. In the example below I have chosen to replace all the items. You need to keep a track of the offset if you are keeping the existing items. This is done using the MYNUMCUSTOMITEMS
constant.
For the navigation items you should either put a link, a plugin, or the programatic id of the RE module. In the example below I have used one of each. The link is straight forward. The plugin uses the programatic id of the plugin. That is the project name, a dot and the class name. The Raiser’s Edge items use a similar system. There are handlers in RE that start the modules just as the plugins are started. If there is not a handler for the module then it is possible to create your own (you are essentially just creating a plugin that is a wrapper for the module). If you add Blackbaud RE Shell Library 7.5 to the reference and then look at the object explorer you can see which handlers are available.
Once you have compiled the code you will need to copy it to the plugins directory (actually you do not need to have it there but it is good to keep everything in one place) and register it.
Start RE and you will see your changed navigation bar. Next step a real fully fledged custom skin for RE!
Here is the code:
Public Sub CustomizeFrontEnd_CustomFrontEndItem(ByVal lCustomItem As Long, sPluginProgID As String, vReserved As Variant) 'lCustomItem : index of custom item to define 'sPluginProgID : Programatic ID of a registerred plug-in which will serve as an available item in then front-end of the application 'vReserved : reserved 'NOTE: see comments in CustomizeFrontEnd_UseCustomFrontEnd On Error GoTo ErrHandler Const MYNUMCUSTOMITEMS = 3 lCustomItem = lCustomItem - mlStartItemOffset If ((lCustomItem > 0) And (lCustomItem <= MYNUMCUSTOMITEMS)) Then Select Case lCustomItem Case 1 sPluginProgID = "HTTP://WWW.ZEIDMAN.INFO" Case 2 sPluginProgID = "TESTPLUGIN.CTESTPLUGIN" Case 3 sPluginProgID = "RE7DOCS.CConfigDocHandler" End Select End If On Error GoTo 0 Exit Sub ErrHandler: Dim sErr As String sErr = Err.Description On Error GoTo 0 '< place your custom error handling code here > MsgBox "Error processing CustomizeFrontEnd_CustomFrontEndItem : " & sErr Exit Sub End Sub 'Allows you to replace the functionality exposed by the standard application front-end with your own Public Sub CustomizeFrontEnd_UseCustomFrontEnd(bUseCustomFrontEnd As Boolean, bReplaceFrontEnd As Boolean, lNumCustomItems As Long) 'bUseCustomFrontEnd : if set to true, lNumCustomItems must be greater than zero 'bReplaceFrontEnd : if set to true the only the front-end customizations you define will be available in the application, if set to false, your customizations will be appended to the existing items in the application 'lNumCustomItems : specifies the number of custom items provided 'NOTE: the initial value of lNumCustomItems indicates the number 'of custom items already defined by other VBA Customizations. In 'order for your customizations to work correctly with others, you 'will need to cache this value (ie in a module level variable) On Error GoTo ErrHandler Const MYNUMCUSTOMITEMS = 3 mlStartItemOffset = lNumCustomItems bUseCustomFrontEnd = True 'uncomment this line to customize the front end bReplaceFrontEnd = True 'uncomment this line if your customizations will replace all standard functionality lNumCustomItems = lNumCustomItems + MYNUMCUSTOMITEMS On Error GoTo 0 Exit Sub ErrHandler: Dim sErr As String sErr = Err.Description On Error GoTo 0 '< place your custom error handling code here > MsgBox "Error processing CustomizeFrontEnd_UseCustomFrontEnd : " & sErr Exit Sub End Sub
And here is the end result…
To get an icon to show up on your custom menu item use a PNG graphic and implement the IBBShellDocument interface in your class rather than the IBBPlugIn interface.