If the aim is to allow the user to edit only part of the document, e.g. in your sample to add the name and address, you don't need a macro. You can use content content controls to accept the user input and add editors to the controls before protecting as read only and then the user can only edit the content control contents. See attached (the password is the same as your sample).
The easiest way to do this is to use
Insert Content Control Add-In which includes the options to add editors and protect the document. It can be done without, but it is more fiddly to do so.