I have a script I have been using for a while and trying to use it for another job/report automation it will run and attach file but will not input the verbiage in the body of outlook. Need help as to why this is not inputting the verbiage see below


Dim ToAddress
Dim MessageSubject
Dim MessageBody
DIM UW_MSP
Dim objFSO, objFile
Dim ol, ns, newMail
Dim Report_refresh
Dim REPORT_NAME,INITIAL_PATH,HISTORY_PATH
DIM rng
strMonth = Month(Date)
strDay = Day(Date)
strYear = Right(Year(Date),4)

'------------------------FILL IN THE REPORT INFORMATION BELOW----------------------------------------------------------------
REPORT_NAME="125_Relief_Granted_Class_Code"

INITIAL_PATH="\\NAEAST.AD.JPMORGANCHASE.COM\amercfs$\RFSCL\NACLSHARE25\DLSHARE\RmShare\New -- Foreclosure\-BOSS\Procedures and Report Logic\125-Relief_Granted_Class_Code\"

HISTORY_PATH="\\NAEAST.AD.JPMORGANCHASE.COM\amercfs$\RFSCL\NACLSHARE25\DLSHARE\RmShare\New -- Foreclosure\-BOSS\Procedures and Report Logic\125-Relief_Granted_Class_Code\History\"

'Update email distribution below.
'------------------------UPDATE THIS INFORMATION IN THE EXCEL REPORT-------------------------------------
'1) Make sure you have BACKGROUND refresh off on your data connections

'2)On the excel report;rename the field that has the current date of the report to "REPORTDATE"
'----------------------------------------------------------------------------------------------------------------------------
'----------------------------------------------------------------------------------------------------------------------------
ON ERROR RESUME NEXT
' Set Excel Objects ##
Set objExcelApp = CreateObject("Excel.Application") 'Create the Excel app
objExcelApp.Visible = False
objExcelApp.DisplayAlerts = False

Set objExcelWB = objExcelApp.Workbooks.Open(INITIAL_PATH & REPORT_NAME & ".xlsx")
Set objExcelWS = objExcelWB.WorkSheets(1)

REPORT_DATE=objExcelWS.Range("REPORTDATE").Value

objExcelWB.RefreshAll
objExcelWB.save

'CHECKS THE DATE
IF REPORT_DATE <>objExcelWS.Range("REPORTDATE").Value THEN
Report_refresh ="Y"


MessageSubject = REPORT_NAME & " REPORT REFRESHED"
MessageBody= REPORT_NAME & vbNewLine & vbNewLine & "PRIOR REPORT DATE: "& REPORT_DATE & vbNewLine & vbNewLine & "UPDATED REPORT DATE:" & objExcelWS.Range("REPORTDATE").Value & " -REFRESHED- " & vbNewLine & vbNewLine & " Please see the attached report.All loans with Concurrent Filing rails are included and any with MSP bankruptcy status other than Active are highlighted."


ELSE
MessageSubject = REPORT_NAME & " REPORT REFRESHED ERROR"
MessageBody= REPORT_NAME & vbNewLine & vbNewLine & "PRIOR REPORT DATE: " & REPORT_DATE & vbNewLine & vbNewLine & "UPDATED REPORT DATE: " & objExcelWS.Range("REPORTDATE").Value & " -NOT REFRESHED- "
MessageBody= MessageBody
END IF


objExcelWB.Close true 'Close our workbook
REPORT_DATE =""

IF Report_refresh ="Y" THEN

'COPIES to HISTORY folder path

'refresh
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(INITIAL_PATH & REPORT_NAME & ".xlsx")
objFSO.CopyFile objFile.Path, HISTORY_PATH & REPORT_NAME &"-" & strMonth & "-" & strDay & "-" & strYear & ".xlsx"


'Used to change the file to read only
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(HISTORY_PATH & REPORT_NAME &"-" & strMonth & "-" & strDay & "-" & strYear & ".xlsx")
If objFile.Attributes = objFile.Attributes AND 1 Then
objFile.Attributes = objFile.Attributes XOR 1
End If

END IF


'GETS USER NAME
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strUserName = wshShell.ExpandEnvironmentStrings( "%USERNAME%" )

'FINAL EMAIL

ToAddress = strUserName & "@exchange1.jpmchase.com"
MessageSubject = MessageSubject
MessageBody = MessageBody

Set ol = WScript.CreateObject("Outlook.Application")
Set ns = ol.getNamespace("MAPI")
ns.logon "","",true,false
Set newMail = ol.CreateItem(olMailItem)
newMail.Subject = MessageSubject
newMail.Body = MessageBody & vbCrLf
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Set objFil = objFSO.OpenTextFile("\\XXXXXXXXXX.com\amercfs$\RFSCL\NACLSHARE17\TPSO PROGRAM CONTROL\Team Folders\Reporting\1.REPORT_AUTOMATION\LTOTPSO.htm")
newMail.HTMLBody = MessageBody & vbCrLf & "<br>" & "<br>" & "<br>" & "<br>" & objFil.ReadAll


' validate the recipient, just in case...
Set myRecipient = ns.CreateRecipient(ToAddress)
myRecipient.Resolve
If Not myRecipient.Resolved Then
MsgBox "unknown recipient"
Else
If Report_refresh ="Y" then
'newMail.Recipients.Add(myRecipient)
'newMail.Recipients.Add("XXXXXXXXXXXXXXXX.com")
newMail.Recipients.Add("XXXXXXXXXXXXX.com")

ELSE
newMail.Recipients.Add("XXXXXXXXX.com")

END IF
newMail.Attachments.Add(HISTORY_PATH & REPORT_NAME & "-" & strMonth & "-" & strDay & "-" & strYear & ".xlsx")

END IF

newMail.Send


Set ol = Nothing

'----------------------------------------------------------------------------------------------------------------------------


objExcelApp.DisplayAlerts = True
objExcelApp.Quit 'Quit the Excel app
Set objExcelApp = Nothing
Set objExcelWB = Nothing
Set objExcelWS = Nothing


WScript.Quit