When you are working on a windows machine you have MS Access which can 'talk' to MS Word.
And then you can also use Visual Basic for Applications and then you can do something like this
cSQL = "SELECT * FROM qry_Overzicht_Leden WHERE LID_ID = " & ID
Set rst = CurrentDb.OpenRecordset(cSQL)
If rst.EOF = False Then
' Document laden.
.Documents.Add (cSjabDir & SjabAlgemeen)
' Vul de gegevens in.
.Selection.GoTo What:=wdGoToBookmark, Name:="bkmAan"
.Selection.TypeText Text:=rst!Lid_Voornaam & " " & rst!Lid_Tussenvoegsel & _
IIf(IsNull(rst!Lid_Tussenvoegsel) Or rst!Lid_Tussenvoegsel = "", "", " ") & _
IIf(IsNull(rst!Lid_Achternaam), "", rst!Lid_Achternaam)
.Selection.GoTo What:=wdGoToBookmark, Name:="bkmAdres"
.Selection.TypeText Text:=IIf(IsNull(rst!Lid_Adres), "", rst!Lid_Adres)
.Selection.GoTo What:=wdGoToBookmark, Name:="bkmPostcode"
.Selection.TypeText Text:=IIf(IsNull(rst!Lid_Postcode), "", SchrijfPostcode(rst!Lid_Postcode) & " ") & _
IIf(IsNull(rst!Lid_Woonplaats), "", Format(rst!Lid_Woonplaats, ">"))
.Selection.GoTo What:=wdGoToBookmark, Name:="bkmVoornaam"
.Selection.TypeText Text:=IIf(IsNull(rst!Lid_Voornaam), "", rst!Lid_Voornaam)
' Opties in bestand aanpassen.
.ActiveWindow.View.type = wdPageView
.ActiveWindow.View.ShowBookmarks = False
' Laat Word gemaximaliseerd zien.
.visible = True
.Application.WindowState = wdWindowStateMaximize
So in short: i search for a predefined bookmark and then i replace that bookmark with something from the search-query.
Is this also possible in Lazarus on a Mac?