You can populate documents from database.
Just put some text in double square brackets [[
For more details see ready working example in zip file.
Mr. and Mrs. [[parents]]
announce the marriage
of their [[child's sex]]