You could use a simple PressTalk within a Custom Data Selection to do this.
Add a Data Selection object to your form.
Go to the Data page in the dialog and select the Custom Data Selection check box
In the String to Display box, type the following:
=if(trim(@(1,1,25))='', '',trim)@(1,1,25))+',')
Here is what this does:
Remember that the syntax of the if() function is
if(condition to test, value if true, value if false) First, it tests a condition -
This says "if we remove the extra spaces - trim() - from our data selection - @(1,1,25) - is it equal to an empty string - = ''?
If it is, then display an empty string -
If it is not, then display the data selection (with extra spaces trimmed off) followed by a comma -
Once you get the first address to display properly, double click on the word 'true' in the CRLF column to toggle it to 'false', and then press Enter to add another data selection. you can now copy any paste your code from the first data selection - changing the line number as needed - @(2,1,25).
Repeat as many times as you like.
You could achieve the same result with a Text object by going to the Variables dialog and creating a variable for each address line, using the same technique.
Hope this is helpful to you
Good luck.
JAFrank