08-26-2011, 12:00 AM
how to program that...
if text contains a date, like 22.08.2011 22:32, --> do end macro
that could only be sth. like: "if text contains "2011" --> end macro"
or if text begins with numbers, --> end macro.
and another question:
if text contains "today" then replace that with the current date e.g. 26.08.2011
and if text contains "yesterday", then replace that with the current date minus one day
I want to do that so, that some list of entries will be changed either if the entry do not contain any date, the date will be get from some place and added, -- so long the macro runs well --
or if some date has been added before, the macro stops,
or if the text, from where the date schould be readed contains "yesterday" or "today" then a current date or current date minus one day is replaced.
firstly I look for s.th to end the macro.
is it anyhow possible, to get yesterdays date?
(easy in one month, but what, if the date of yesterday the 1.3.2011 must be a 28.2.2011?
- is such thing possible at all?) :roll:
if text contains a date, like 22.08.2011 22:32, --> do end macro
that could only be sth. like: "if text contains "2011" --> end macro"
or if text begins with numbers, --> end macro.
and another question:
if text contains "today" then replace that with the current date e.g. 26.08.2011
and if text contains "yesterday", then replace that with the current date minus one day
I want to do that so, that some list of entries will be changed either if the entry do not contain any date, the date will be get from some place and added, -- so long the macro runs well --
or if some date has been added before, the macro stops,
or if the text, from where the date schould be readed contains "yesterday" or "today" then a current date or current date minus one day is replaced.
firstly I look for s.th to end the macro.
is it anyhow possible, to get yesterdays date?
(easy in one month, but what, if the date of yesterday the 1.3.2011 must be a 28.2.2011?
- is such thing possible at all?) :roll: