Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook template auto update dates

Status
Not open for further replies.

OCM

MIS
Sep 12, 2002
220
US
Greetings,

I send out e-mail w/ attachments to the same group of recipients daily. Since the body of the e-mail remains the same every day, I created a template & auto updates <today’s date> where ever I have it.

Given the following, how can I auto update <yesterday’s date >
Subject: daily report for <current date>

Body
The first attachment is for <yesterday's date>
The second attachment is also for <yesterday's date>
.
.
.
The third attachment is for <today's date>

TIA,


OCM
 
Did you try something like:
The first attachment is for <today’s date -1>

Have fun.

---- Andy
 
Andy,
Thanks. Yes, I tried diffrent variations for <today’s date -1> like =Today()-1 without any success.

Regards,

OCM
 
So how do you get the <today’s date> to work?
Is any VBA involved?
Did you try [tt]=Date -1[/tt] ?

Have fun.

---- Andy
 
To get the <today’s date> to work:

Insert > Date & Time and choose update

For Subject:
Developer > Design a Form > message > open
right click Subject > properties> value and type the syntax there

And,no BA involved.

Regards,

OCM
 
I've never played with this, but in your Outlook template, you can right-click on Subject - Properties - Value Tab
For "Intial Value" you can click on 'Edit...' click on 'Function' select Date/Time select 'DateAdd( interval , number , date )'

interval is a String, "d" - days, "w" - weeks, etc.
Number (of 'intervals')
date - from which to calculate
so:[tt]
DateAdd("d", -1, Date())[/tt] should give you yesterday's date.

Just a guess here....

Have fun.

---- Andy
 
That is how I got the subject to auto populate. My question was how to update yesterday’s date within the body of the e-mail.
e.g.

Body
The first attachment is for <yesterday's date>

Regards,


OCM
 
So instead of Subject line, if you go to Body and set it up with
[tt]DateAdd("d", -1, Date()) [/tt]
Would that work?

Have fun.

---- Andy
 
Andy, I tried your suggestions, but didn't work.

Rrgards,

OCM
 
I have no other ideas, sorry :-(
For now I would just have simple text (without an actual date):

Body
The first attachment is for yesterday's date

Maybe somebody more knowledgeable will jump in and help you...

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top