Hello,
Could you please make sure that you set the 
match property of boolean type to 
true in the code of the custom macro, for example:
   switch (expression.ToLower())
   {
      case "currenttime":
        // match needs to be set to true
        match = true;
        result = DateTime.Now.ToString();
        break;
   }
   return result;
}
If it does not help, could you please post here the code of the custom macro? Thank you.
Best regards,
Michal Legen