Can a user-defined property be added to drawings via a macro / API?

I´m new in programming and got the task to find a way to solve this issue with a macro. In the best case, a message should appear first as to whether this property already exists and, if not, the macro should start and insert the property on a defined place. In new drawings this user-defined propery is already added, but if an older drawing is opened this property should be added automatically. Also for Could you give me any help?

Thanks in advance!

Martin

SolidworksApi/macros