Append Date and Time to the Subject of an email (objEmail.subject)

Good afternoon. I would like to add the date and time to the subject line of an e-mail generated by a webpage form. Currently, I have updated the objEmail.subject line to be:

objEMail.subject = "Inquiry from Ask The Experts Section. " & Mid(Now(),1,InStr(1,Now(),":"))

I get an e-mail with the following subject: Inquiry from Ask The Experts Section. 3/9/2011 11:

What do I need to change to get the rest of the time? If I remove the :, I get no time at all. The time format should be 11:52 AM or something similar.

Alternatively, I have tried to use an Exchange transport rule to append the date/time to the subject line of an e-mail addressed to this specific user. I could not find a solution using transport rules, so I am open to other suggestions on the Exchange 2007end.
LVL 1
dangoforthAsked:
Who is Participating?
 
wdosanjosConnect With a Mentor Commented:
Please try this:

    objEMail.subject = "Inquiry from Ask The Experts Section. " & Now()
0
 
dangoforthAuthor Commented:
wdosanjos

Tried it and I get a subject line that says "False".
0
 
dangoforthAuthor Commented:
wdosanjos

Sorry - typo. Your suggestion worked well. Anyone want to weigh in on the Exchange side?
0
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.

All Courses

From novice to tech pro — start learning today.