Can you use search and replace to insert mail merge fields?

Post Reply
jsb-law
Posts: 4
Joined: Sun Dec 27, 2020 6:24 pm

Can you use search and replace to insert mail merge fields?

Post by jsb-law »

Like the title says. I would like to be able to automate inserting mail merge fields, rather than having to insert the fields manually.

I have a long document (over 40 pages), with about 20 merge variables throughout the document, and a database file for mail merge data. Throughout the document, I have placeholders for the places where the various data merge fields will go. There are multiple instances of each merge variable.

From reading the TextMaker manual, it appears that I would have to manually insert the merge fields after I associate the database with the document. For the document described above, this would require over 100 manual field insertions.

The TextMaker search and replace function is sophisticated, but there is no mention of being able to search for text and replace with a database field.

Is it possible (via search and replace, or by any other means) to insert multiple database fields into a document automatically?
jsb-law
Posts: 4
Joined: Sun Dec 27, 2020 6:24 pm

Re: Can you use search and replace to insert mail merge fields?

Post by jsb-law »

I might have found a possible way to do the manual field entries only one time. If anyone can verify whether the following method works, please post a reply. In the meantime, I will try the method described below and post my results. The method below presumes that you already have a document to use as a template, into which you want to insert persistent data merge fields.

1. Create a data template file, with only the field names (only Row 1 of the database/spreadsheet).
2. In the document template file, associate the template data file: Mailings > Select Database > Use Existing Database. This should open a file dialog window so you can find and select the data file created in Step 1.
3. Insert the pertinent data fields throughout the document template. This is the tedious manual part, but (hopefully) you will only need to do this once.
4. Save the changes to the document, and close.
5. Create a new data file, using the data template.
6. Add your data below the appropriate field names (Rows 2...#).
7. Save the new data file with a unique name.
8. Create a new document from the document template file. The new document should contain the data fields you added in Step 3 above.
9. Change the associated database to the new data file you saved in Step 7: Mailings > Select Database > Use Existing Database; select the data file from Step 7.
10. Merge the data: Mailings > Show Merge Record.

::fingers crossed::
jsb-law
Posts: 4
Joined: Sun Dec 27, 2020 6:24 pm

Re: Can you use search and replace to insert mail merge fields?

Post by jsb-law »

*UPDATE*

I can confirm that the method described in post #2 works.

One other helpful thing I discovered: there's a shortcut to insert fields from the associated database. In Mailings, select Merge field and there is a drop down menu labeled Insert merge field, and below that, the list of fields from the associated database file. Click on the field name you want to insert.
Post Reply

Return to “TextMaker 2021 for Linux”