Webpart layouts are C# code so you probably won't be able to get a macro to work properly. I've seen many people just add the field in the webpart and hide/show it based on some visibility properties and/or set the default value to a macro in the webpart.