Since you haven't posted your attempts or techniques and said what specifically has failed I can't suggest what to fix, but check out this tutorial from Evan Abrams which uses the sourceRectAtTime expression to control the size of a box/shape layer based on a text layer: SourceRectAtTime() Expression- Adobe After Effects tutorial - YouTube
Hi David, It is Evans scripts I used. But I always mess it up when I tried to scale the rectangle shape layer. But Evan says its possible to fix with more math. But I'm more and editor these days and not so good with expressions. But he also gave me a tips of a hack using the repeater I will try.
Be more specific. Show us your setup with some screenshots with All modified parameters visible (type UU)
And explain what exactly is not working the way it should.