When you say it doesn't work do you mean the output you get is the macro you entered in the field? If so, then you need to resolve that macro in your code behind. This can be done something like this:
var customPropertyValue = CMS.MacroEngine.MacroResolver.Resolve(CustomProperty);
So even though you won't get the macro UI to enter a macro, you can still enter macro syntax, it just needs to be handled after that.