Hello Stefan,
After creating your custom macro you need also to register your macro method container for a certain object type or macro namespace.
For more details and code example please refer to: Registering custom macro methods
Best regards, Martin