Hi Jessy,
To add the date from Cell E8 to your Subject line just add one line of code and change one line of code where I've indicated:
Public Function SendEmail()
Const sDATE_CELL As String = "E8"
' ADD THE ABOVE LINE <<<<<<<<<<<<<<<<<<<<<<<
Dim objOutlook As Object
Dim objEmail As Object
Dim vDataRange As Variant
Dim sTemporaryFile As String
Dim sCopiesTo As String
Dim sMailText As String
Dim sSubject As String
Dim sSendTo As String
On Error GoTo ErrorEncountered
sSubject = "Mail - " & Sheets("Sheet1").Range(sDATE_CELL).Value
' CHANGE THE ABOVE LINE <<<<<<<<<<<<<<<<<<<<<<<
I'm not sure about the flashing taskbar item - I've encountered it in the past, but the problem wasn't fully reproducible and I was never able to discover either a solution or a workaround.
Did this problem occur with the earlier version of the code? The code is working correctly on my pc at the moment (Windows XP, Office 2010).
Anyway, I hope the addition of the date in the subject line is of some help to you - please continue to let me know how you're getting on.
Regards,
Greg M
Bookmarks