Macro for Libreoffice Base: opening pdf file on harddisk

I have created a very simple database so that I can assign tags to pdf files. A kind of simple document management system.
What I would like to be able to do, is to open a pdf file with a pdf viewer from a field with the absolute path in it.
So I need to write a macro for it.
Problem is that I have never done that before and I don’t know where to start.
A big thank you in advance.

Hello,

In future please include basic information - LO version, OS, database used, and connector type when appropriate.

Hello,

Learning/developing LO macros requires some effort. Here is a starting point, the LO Base documentation → LibreOffice Base Handbook

Now as for some code, see answers and links here → Open external pdf files in BASE

and:

open pdf in linux with help of base-macro