PDA

View Full Version : insert Date/Time in body of message



TrippyTom
10-24-2005, 01:04 PM
Is there some simple code I can use to put in the current date/time (static, does not change when the message is read) in the body of a message?

I have created a template that I use to send out to clients that is intended to give them an ETA for their project completion. It would be nice if the template automatically put in the date/time when I open the template or send it off.

Killian
10-24-2005, 01:28 PM
You could use the Item_Send event (open the VBE - Alt F11, above the code window, select "Application" from the left drop-down and "Item_Send" from the right one)
The following code will add the current date & time at the start of the messageItem.Body = Format(Now, "dd MMM yyyy - hh:mm") & vbLf & Item.BodyThis will happen to every mail you send, so I think you'll want to wrap it in an If... Then/End If and test to see if the item is based on your template - how you do that will depend on how you've set that up