The custom toolbar and menus are the only items that are not accessable through Automation in FlexPro 6. This feature will be available in FlexPro 7. With FlexPro 6 you need to manually add your macro to the UI. Unfortunately, this is possible for VBA macros only and not for external C++ code. Therefore you may need to write a wrapper macro in FlexPro VBA and store that in the template database.