If you need to use a standard font, such as Arial, another possibility to this is to put the formula in a text box with the correct number of tab stop settings on the text box rather than the string. Then, instead counting the number of spaces required, insert only a single tab to each break in the string.
For i := 1 To (UBound(MyArr)) do
(
MyStrLine := MyStrLine & MyArr;
if (Remainder(i, 4) = 0) then
(
MyStrLine := MyStrLine & chr(10);
)
else
(
MyStrLine := MyStrLine & chr(9)
);
);
MyStrLine
To get this to work properly I had to
1. Add an empty Text Box
2. Insert the formula field in it.
3. Highlight the field and, while the field was highlighted and the textbox in edit mode...
4. Put tab stops in the correct locations.
With the sample above I used 1.25, 2.5 and 3.75.
If you have a huge amount of data going in, this may not be best, but it might be worth a try.
Tim
Edited by tconway - 26 Dec 2007 at 10:08am