Create a macro for an envelope

Hello,
I’ve moved to Libre Office and would like to build an easy way to print to DL and C5 envelopes.
The old document I wrote steps to tab x amount of time for text. I guess I can do the same here, however I’m curious about Macros and perhaps programmatically creating a PDF to print:

  • From, in the top left
  • To, in the centre
  • Frank, (digital stamp) in the top right

I tried AI but the major ones are absolute rubbish (will build a self hosting one when I have time) and forum threads are faster and I learn more.

I found this thread however I need a 3rd field on the top right for the Frank stamp details, specifically:
B596
3403
4051

Seems like I’ll have to manually create a table 1x3 and print to PDF?

You might do better using a template. I don’t know what Frank stamp details B596, etc are but you should be able to put them in a frame which can contain pretty much anything that a page can contain. I added an extra frame in the sample below.
DL_EnvelopeForMailMerge.odt (25.8 KB)

Help is a bit fragmented, e.g. Registering an Address Book but the Writer Guide should have more on Mail Merge, download from English documentation | LibreOffice Documentation - LibreOffice User Guides