As I mentioned above, the (free) D3D functions plugin has a command to do this. It wraps with left, center, and right justification.
If you prefer to "roll your own", then you may determine the width of a string, in pixels, with the TEXT WIDTH() command.
With that command, you could start with a long sentence or paragraph and parse through it for spaces. At each space found, you could find the TEXT WIDTH of the LEFT$ up to that space. If it is within a certain distance of your target width, without going over the target width, you could then print the LEFT$, and then remove what you just printed, with the RIGHT$ command.