Here is a portion of the macro I am using to email from a worksheet.
Everything works fine except when I try to add something to the Body of the email it is replacing the portion of the email with the data from excel. I am trying to add a predefined message in the body and then add the excel output below that. But I am stuck. Any ideas?
'Read the HTML file data and insert into the email body
Set objTextStream = objFileSystem.OpenTextFile(strTempHTMLFile)
objNewEmail.HTMLBody = Replace(objTextStream.readall, "align=center x
ublishsource=", "align=left x
ublishsource=")
objNewEmail.Display
'****************************************************************************************
tm = "Test Message "
'Specify email recipients, subjects ; etc, Here
'objNewEmail.Send '--> directly send out this email
objNewEmail.To = mr
'objNewEmail.Cc = ""
objNewEmail.Body = tm
objNewEmail.Subject = "Your Past Due ETA's " & tdd
'objNewEmail.attachments.add=
'****************************************************************************************
objTextStream.Close
objTempWorkbook.Close (False)
objFileSystem.DeleteFile (strTempHTMLFile)
Everything works fine except when I try to add something to the Body of the email it is replacing the portion of the email with the data from excel. I am trying to add a predefined message in the body and then add the excel output below that. But I am stuck. Any ideas?
'Read the HTML file data and insert into the email body
Set objTextStream = objFileSystem.OpenTextFile(strTempHTMLFile)
objNewEmail.HTMLBody = Replace(objTextStream.readall, "align=center x


objNewEmail.Display
'****************************************************************************************
tm = "Test Message "
'Specify email recipients, subjects ; etc, Here
'objNewEmail.Send '--> directly send out this email
objNewEmail.To = mr
'objNewEmail.Cc = ""
objNewEmail.Body = tm
objNewEmail.Subject = "Your Past Due ETA's " & tdd
'objNewEmail.attachments.add=
'****************************************************************************************
objTextStream.Close
objTempWorkbook.Close (False)
objFileSystem.DeleteFile (strTempHTMLFile)