Pages: 1
RSS
The TO field, Can I customize it?
 
I have my contacts loaded properly in the Address Book. The records include Company and Job Title.

I would like the TO field to include the Job Title so that it reads: "John Smith, Candlestick Maker" <john@candles.com>

Is this possible in a template? I would like to produce mass mailings in this manner.

Tks.
 
Quote
batshades wrote:

I would like the TO field to include the Job Title so that it reads: "John Smith, Candlestick Maker" < john@candles.com >

Is this possible in a template? I would like to produce mass mailings in this manner.
Of course, it is (or it was) possible using Address Book macros. I do not know what version of The Bat! you use, because in 10.3 these macros does not work. I have submitted the bug description to developers, so we must wait. In earlier versions these macros were operating.

To build the requested TO filed you should use the following line in your mass mailing template:

Code
%To=""%To='"%ABToName, %ABToJob" <%ABToEmail>'

Maybe it will work in your version of the program.
Edited: Zygmunt Wereszczyński - 17 December 2022 12:22:01
 
v10.3.2 and thank you for responding.

No, that did not work and resulting in access violation warning dialog. How long ago did you submit your bug? I wonder if I should do the same.

Tks.
 
Quote
batshades wrote:

No, that did not work and resulting in access violation warning dialog. How long ago did you submit your bug? I wonder if I should do the same.

I have submitted it today, see https://bt.ritlabs.com/view.php?id=2219.
Edited: Zygmunt Wereszczyński - 17 December 2022 17:59:11
 
If you're good with a text editor (or spreadsheet software?), an alternative solution might be to export the address book to a text file, append the job title and company fields to the Name field, then import it back into the address book.
I volunteer as a moderator to help keep the forum tidy. I do not work for Ritlabs SRL.
 
Batshades wrote "I have my contacts loaded properly in the Address Book.", so there is no needs to use different solutions. After many attempts, I have the solution of problem, simply by using another form of macro to modify the "TO" field. The following line placed in the template gives correct results:
Code
%SetHeader('To','"%ABToName, %ABToJob" <%ABToEmail>')
 
I will try that and report back.

Thank you very much for spending so much time on this.

Your "Master" title is truly deserved.
 
I would like to thank @Zygmunt Wereszczyński, that solution DOES work after all.

I am writing to clergy. I have Job Title field filled with "Rev", "Elder", "Pastor", etc.

The formula delivers a comma as in Rev, John Smith.

Can I eliminate the comma in this formula?

%SetHeader('To','"%ABToJob%20Job%20title, %ABToName, %ABToCompany" <%ABToEmail>')

The current result:

"Rev, John Smith, Mission Church" <johnsmith@ms.com>
 
Your formula should be following:

Code
%SetHeader('To','"%ABToJob %ABToName, %ABToCompany" <%ABToEmail>')

If you won't have commas in resulting text, simply do not place them in the expression in the formula - see above.
Edited: Zygmunt Wereszczyński - 11 January 2023 00:00:30
 
That works perfectly! Thank you so much for spending your time here helping others like me!
Pages: 1