There's a lot of different ways to do this. Let's use the "list of names separated by carriage returns" approach.
Define a global field, gNameList.
Define a relationship
YourTable::gNameList = MailingListTable::Namefield
You'll need to use your field and table names here. YourTable and MailingListTable can even be different table occurrences of the same data source table. Just make sure that mailingListTable is the table specified in your mailing label layout in layout setup...
Write a script.
Go To Layout [Your mailing label layout (mailingListTable)]
Go To Related Record [show only related records; from table: mailingListTable; Using Layout: <current layout>]
Sort records [restore; no dialog] //if you want the labels in a specific order
Enter Preview Mode
I prefer to preview the layout so you can confirm what you are going to get before you actually print them here.
Now you can enter a list of names in the global field and run the script to see the matching list of labels previewed and ready to print.
Note: for best results DO NOT specify a layout in the Go To Related Records step. With <current layout> specified, you get a found set of zero records if the list of names entered do not match any records. You get other unpredictable results here if you specify a layout.
Go To Related Records is a very useful tool, but which is very poorly documented. To learn more about GTRR, click the following link:
The Complete Go To Related Record
Many thanks Phil, I had not thought about creating a name list field. I will work on it right now (it's 1pm here
Down Under) and report results.
I had to shelve this for a day or so, another job. It does not quite work for me. The script is certainly
reading from the list of names and providing the correct number of labels, but the the print out is of
the field names, not the required data.
Check the options you selected to print this. You should select "records being browsed" not "blank record, showing fields".
Records being browsed was already selected - that is what had me confused. So I de-selected it
and selected again - then it worked properly.