Filter text macros depending upon which elements are active