Pages: 1
RSS
Macro to Increment date, Create a macro for automatic emails that use the next sunday's date
 
Hi
How do I create a macro in my subject line that allows me  ; at the the time of sending to specify the next Sunday's date.  The email is sent by the scheduler and it's to remind individuals about events on Sunday.

How do I get the macro to automatically push the date on the subject line forward based on the date that the email is being sent by the scheduler?
I want to incorporate that in my %SUBJECT line.  I cant get my head round the macros

thanks in advance

D
 
I don't think you can do that with TB's default macros.

The %TimeAdd macro from the XMP plugin can do this. The XMP (eXtended Macro Plugin) can be downloaded from: http://www.gaijin.at/tbpxmp.php

The XMP plugin is in German, if that's a problem I'm willing to help you with this macro and installing the plugin.
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Yes please.

Any help will be appreciated.  I cant read a word of German.  I have downloaded it so you can send me the instructions on how to install and make this thing work.

Thanks
 
Code
%_Today='%SetPattRegExp="^(.+?)\,"%RegExpMatch(%DateEn)'%-
%IF:'%_Today'='Sunday':'%_Add(7)'%-
%IF:'%_Today'='Monday':'%_Add(6)'%-
%IF:'%_Today'='Tuesday':'%_Add(5)'%-
%IF:'%_Today'='Wednesday':'%_Add(4)'%-
%IF:'%_Today'='Thursday':'%_Add(3)'%-
%IF:'%_Today'='Friday':'%_Add(2)'%-
%IF:'%_Today'='Saturday':'%_Add(1)'%-
%SUBJECT='%XMP_TimeAdd("%Date(dd.mm.yyyy)",%_Add,"D","dd mmmm")'%-


(if today is sunday, you want to get a date of the next sunday?)

Something about XMP_TimeAdd:
%XMP_TimeAdd([Time], [How many], [What], [Return format])

[Time] must be given as "dd.mm.yyyy hh:nn:ss" or "dd.mm.yyyy".
[How many] is a number (could be with "-" for subtraction, but then number must be surrounded with quotes, for example "-3").
[What] could be: D – days; W – weeks; M – months; Y – years; H – hours; N – minutes; S – seconds.
[Return format] is a typical date format (more info in TB!'s manual, in the chapter 'Macro Date/Time format').
Pages: 1