Sharing variable values across documents

I use a lot of templated documents, such as leases, where I’ll enter parameters such as someone’s name, phone number, etc. and have them appear several times in the document. Currently I do this by setting up User Variables for each template, then editing those variables when I want a new lease for a specific situation.

But I have several writer documents per lease. So I have to enter redundant information in the user variables of each document. Ideally I’d like to just enter these variables into one Calc file and have my writer documents insert values from cells in this Calc file. What’s a good way to do this?

Mail Merge should work for you. Mail Merge can use a spreadsheet as a data source and several Writer documents can use the same data source. Mail merge is covered in Chapter 11 of the LibreOffice Writer’s Guide. This link offers a shorter version using the Mail Merge Wizard.

Assuming you have spreadsheet and documents already:
Register your spreadsheet as the data source (see documentation or Edit>Exchange Database or Tools>Mail Merge Wizard)

In the Writer document, view data sources (F4)

Click on the field titles in the tabular data source display and drag the fields to the places in the document where you want them. Save the document.

Print the document–answer yes to the form letter question.

In the Mail Merge dialog be sure you are using the correct data source.

Choose the records to print. If you just want one, click the data margin to select it

Print to Printer or File.

Thanks! This is precisely what I needed.