prexpresso,
This will be difficult, since you can only control how the words are wrapped in some limited ways.
I have two suggestions that you can try(they aren't perfect, but pretty much as close as you will get):
- Enable Copy Fitting in the object's properties, and give it a small minimum font size. This way, if the name becomes too long, it will reduce the font size, and so it will never wrap at all, thus eliminating the problem.
- You could make two text boxes on top of each others. Each of the text box would use a different variable to display the data. One box would have a greater width than the other. The idea is to put an IF statement in those variables, and if the name of the company goes beyond a certain length, you display the variable in the SMALL box, to ensure it will wrap toward the middle of the company's name.
Here's an example of the expressions you could use in each of the variables:
LARGE BOX'S VARIABLE:
IF(LEN([COMPANY_NAME]) <= 15, [COMPANY_NAME], "")
SMALL BOX'S VARIABLE:
IF(LEN([COMPANY_NAME]) > 15, [COMPANY_NAME], "")
In this example, if the company name is 15 characters or less, it will display it in the large box. If it's greater than 15 characters, it will display it in the small box, which will wrap more words on the second line. Of course, feel free to adjust the number of characters, and the width of the two boxes to suit your needs.
Feel free to experiment with these two methods, though as I've said, there is only a limited number of ways that you can affect word wrapping, so the options are unfortunately a bit limited.
Regards,
Raphaël Lalonde-Lefebvre