I was just omitting it for security reasons. This is the code I came up with in the end. Thank you for your help.
Dim txtTO, txtCC, txtBCC, txtSubject, txtMessage As String
Dim outFile, filename, date1, path, ext As String
MyDate = Date
date1 = Format(MyDate, "mmm d yyyy")
path =...