.msg file, set %date% to be autocompleted

I have some .msg file, it has a date in the subject (day of the week and day of the month) and also in the message body, i need it to be completed automatically for the given day.

ie. if today is monday, when i open the .msg file, i need it to display - monday 07/13/2015 instead of writing it myself everyday.
LVL 1
celticianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

QlemoBatchelor, Developer and EE Topic AdvisorCommented:
This does not make sense. MSG files are static copies of mail messages, no dynamic content. Imagine the subject would change each time you open a stored message?!
0
Alexei KuznetsovMicrosoft Outlook MVPCommented:
Agreed with Qlemo. What do you exactly do with this MSG file? You open it, change the date manually and then what? Just save it back?
0
celticianAuthor Commented:
OH ok i didn't know it couldn't be dynamic.

I need to send it... with the current date.

What option would you suggest for that?
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
An Outlook VBA macro, called on message send, can do that. It would run for all mail you send, though.

Put this into your ThisOutlookSession module in VBA Editor (Alt-F11), then restart Outlook, and test.
Public WithEvents olApp As Outlook.Application 

Public Sub Application_Startup()
  set olApp = Outlook.Application
End Sub

Private Sub olApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
  Item.Subject = Replace(Item.Subject, "%date%", date)
  Item.Body    = Replace(Item.Body   , "%date%", date)
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.