Notices


Reply
 
LinkBack Thread Tools Display Modes

Old 01-30-2008, 06:40 PM   #1 (permalink)
Junior Member

Join Date: Sep 2007
Posts: 11
Rep Power: 0 mobius is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- API/VBA

Tips on using IBBMacroProperties?

Hi everyone,

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-31-2008, 04:53 PM   #2 (permalink)
Likes to customize RE!

DavidZ's Avatar

Join Date: Jul 2006
Location: London, UK
Posts: 335
Rep Power: 3 DavidZ is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- API/VBA

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.

You need to implement the following methods:

IBBMacroProperties_Description
IBBMacroProperties_ImageFilePath
IBBMacroProperties_SupportedMetaObjects

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.

David
__________________
David Zeidman
Zeidman Development
http://www.zeidman.info

Check out my RE API blog
http://www.re-decoded.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
toolbar, vba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Cheap Gas - Loans - United Specialties - Loans
All times are GMT -6. The time now is 11:50 AM.

Miscellaneous


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel Team 2008 :: jvbPlugin R1012.364.1

SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger
Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64