Paragraph break in exported text?

Is there any way to export text that has multiple lines for each record? I’d like to export a text file which resembles address labels, for example:

John J. Jones
123 Main St.
Anytown, MA 02111

Mary B. Smith
456 Second St.
etc., etc.

I’ve been unsuccessful in getting the Text Export Wizard to do this. No matter what I enter into the formula bar, I always get one line of text for each record.

I know that I could enter dummy characters (for example $$) instead of the line break, so that the exported file would read:

John J. Jones$$123 Main St.$$Anytown, MA 02111

Then I could use my word processor to find-and-replace $$ with paragraph breaks. But I’d like to avoid that extra step if possible.

Thanks for any tips you can offer.

You can do it with an export command in a procedure.

Export "~/Desktop/Address List.txt",Name+cr()+Street+cr()+City+", "+
             State+" "+Zip+cr()+cr()

The exact formula would depend on what fields you have and what they are named.

These days, it would probably be better to use the lf() function instead of cr(). Carriage return was standard on the original Mac OS, but OS X (and macOS) have switched to linefeeds.

By the way, you could use a similar technique in the Text Export wizard itself. Remove all of the columns from the arrangement except one, then type the formula into the column properties area:

Once you’ve set this up once, you would probably want to save it as a template for later re-use.

1 Like