Mail merge is used to batch-process many personalized documents in Microsoft Word and other office suites. Both a template letter and a database or spreadsheet with the required information is needed. The template letter is then filled with the details found in the database.
For example, if there is a document that reads "Dear (FIRSTNAME) (LASTNAME)," using mail merge, the (FIRSTNAME) and (LASTNAME) symbols are replaced with the corresponding details. Some software can also do logical operations so that if the database entry is marked as male or female, the software will replace the first name section with either Mr. or Mrs., depending on the data available.