On Mon 5-Jul-04 10:06pm -0400, Bill McCarthy wrote:

> In my family address book, I have multiple entries for the with the
> same email address.  For example:
>
>     Name      Handle  Address
>     ----      ------  -------
>     Dad         dd    [EMAIL PROTECTED]
>     Mom         mm    [EMAIL PROTECTED]
>     Mom & Dad   md    [EMAIL PROTECTED]
>
> My templates use address book macros and pick up the same name no
> matter whether I enter dd, mm or md.  How do I get around this?
>
> Here's my new message macro:
>
> -----------------------------------------
> %_Addr="%ABToFirstName <%ABToEmail>"%-
> %To=""%To=%_Addr%-
> %From="%ABFromFirstName <%ABFromEmail>"%-
> Dear %ABToFirstName,
>
> %Cursor
> %QInclude="FamSig"%-
> -----------------------------------------

Solved!  Eliminate the duplicate email addresses by appending #1, #2,
etc. to the addresses of entries with duplicate addresses.  Now there
are no duplicates to confuse TB!.

I wasn't able to clear these tags in the template without causing
address book macros from picking up the wrong information.  I got
around this by inserting the name of the QT that makes the change.

First, in a new line before "%Cursor" (see above) add:

%IF:"%SETPATTREGEXP='#'%REGEXPMATCH='%To'"="#"%-
:"Hit_Ctrl_Space":""%-

Now create a QT called, of course "Hit_Ctrl_Space.qt".

Here it is:

%SetPattRegExp='(.*?)#'%-
%RegExpBlindMatch(%To)%-
%To=""%To="%Subpatt(1)>"%-

This approach fails if the To field has any address following a '#'
address.  Modifying the QT so it wipes out #\d+ and calling itself
when there are any '#' remaining should solve this - maybe this
weekend?

-- 
Best regards,
Bill



________________________________________________
Current version is 2.11.02 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to