A macro that substitutes a name into a template. Макрос, подставляющий имя в шаблон

It would be very convenient if you made a macro that substitutes the name of the correspondent in the letter template. For example, I am writing a letter for Alexander Lednev a_lednev@mail. ru (I don’t know such a person, the example is made up). My email template looks like this:

Hello, .

I wish you success.
Andrew email.

With a macro substituting the name after the word “Hello”, it would look like this:

Hello, (here is a macro that takes the name from the address and substitutes it in this place) Alexander.

Below is the text of the letter and the signature.
About 15 years ago I met such a macro for another mail program. The macro had a configuration file that could be edited manually. That is, opposite the name “Alexander” you can add all varieties of this name - Sasha, Sashok, Shura … (we have all these names mean Alexander) and so on, and the macro will always put the name “Alexander” after the word “Hello”. Very comfortably. Of course, it’s better to edit the names through settings rather than editing the file directly. I hope I was able to clarify the essence of the proposal.

Было бы очень удобно, если бы Вы сделали макрос, подставляющий имя корреспондента в шаблон письма. Например, я пишу письмо для Александр Леднёв a_lednev@mail.ru (не знаю такого человека, пример выдуман). Шаблон письма у меня, допустим, такой:

Зравствуйте, .

Успехов Вам.
Андрей е-мэйл.

С макросом, подставляющим имя после слова “Здравствуйте”, это будет выглядеть так:

Здравствуйте, (здесь макрос, который берёт имя из адреса и подставляет его в это место) Александр.

Далее текст письма и подпись.
Я лет 15 назад встречал такой макрос для другой почтовой программы. У макроса был конфигурационный файл, который можно было править вручную. То есть напротив имени “Александр” можно дописать все разновидности этого имени - Саша, Сашок, Шура… (у нас все эти имена означают Александр) и так далее, и макрос всегда будет ставить после слова “Здравствуйте” имя “Александр”. Очень удобно. Конечно, лучше сделать правку имён через настройки, а не через редактирование файла напрямую. Надеюсь, я сумел разъяснить суть предложения.

We have a few variables that you can use.

For this, use {Given Name}

On Send, it will be replaced with the given name from the contact

1 Like

Спасибо большое за совет. Можно ли как-то настроить этот макрос? Дело в том, что он выбирает последнее слово Иванов Иван Иванович, а это не имя, даже не фамилия, а отчество.

Thank you very much for your advice. Is there any way to customize this macro? The fact is that he chooses the last word Ivanov Ivan Ivanovich, and this is not a name, not even a surname, but a patronymic.

It uses Given Name from the Contact.

You can use {Full Name} which is the given name + middle name + surname, or {Given Name} or {Surname} depending on which of the fields you have put the name in.

Thanks Gary.
I remade the address book so that the last name is at the end. Please tell me how to make this macro take the first and middle name. It is customary for us to address by name and patronymic. Sergei Petrovich Seznev. Sergei - name, Petrovich - patronymic, Seznev - surname. Is it possible to make the macro insert “Sergey Petrovich” into the letter, and not just “Sergey”?
There is also a problem, I hope the developer reads this thread. I inserted {Given Name} into the template, but now when sending a letter, a window pops up with a message:

Снимок экрана 2022-08-14 125154

It says here that a variable was found in an email with multiple recipients. The email will be sent as multiple emails, in each of which the variable will be replaced with the appropriate recipient information. Actually there is only one recipient.

And one more thing - please make it so that the name is immediately displayed in the letter, and not the macro. So now I see:

Hello {Given Name}.

And only after sending the letter, the name is substituted in the text:

Hello Sergey.

It would be convenient if this was done immediately. In The Bat mailer, values ​​are immediately substituted when using macros. It would be nice to make a tooltip - if you hover over the name, the name of the macro that put this name here pops up. You can also highlight the color, but not much different from the main one.

No. Only Given name or Surname.

Yes, this was worded incorrectly and will be fixed in an upcoming release

We only replace the variable on Send, as this function is really meant for mass mailing. It is not possible to replace it before.