Hi,
The code is missing a left parenthesis in this line:
(IF (/= CDR (ASSOC 0 ENT)) "TEXT")
change it to:
(IF (/= (CDR (ASSOC 0 ENT)) "TEXT")
Although it allows this code to run, the "textbox" function will probably not give you the results you want, without adjusting for rotation angle, obliqueing angle, etc.