@Stu put all that string stuff into variables, and build it outside the mailing bit.
It will add clarity and assist with debugging.
What happens when you use this:
Code:
Dim sBody as string
Dim sLF as string
Dim sTo as string
Dim sSubject as string
sLF = Chr(13) & Chr(10)
sTo = [Forms]![FRM_TBLALL_FullDetails]![SSFRM_TBLALL_StaffDetails].[Form]![CmbSupervisor].Column(0))
sSubject = "HR REPORT COMPLETED - [" & UCase([Forms]![FRM_TBLALL_FullDetails].[Form]![LblRef]) & "]"
sBody = "The HR Report has now been completed. USBs containing the download report will now be placed in HR Secure storage for your collection under the Ref numbers below." & sLF
SBody = sBody & "<B> HR Report Reference Numbers:</B>" & sLF
SBody = sBody & "Working Copy - " & [Forms]![FRM_TBLALL_FullDetails]![SSFRM_TBLALL_StaffDetails].[Form]![LblWorkingCopyRef] & sLF ' MAKE THE REF NUMBER SHOW BUT AS A HYPER LINK
SBody = sBody & "Backup Copy - " & [Forms]![FRM_TBLALL_FullDetails]![SSFRM_TBLALL_StaffDetails].[Form]![LblBackupCopyRef] & sLF ' MAKE THE REF NUMBER SHOW BUT AS A HYPER LINK
SBody = sBody & "<B>Your USB BitLocker password is:</B>" & sLF '& _ MAKE BOLD TEXT
SBody = sBody & Forms]![FRM_TBLALL_FullDetails]![SSFRM_TBLALL_StaffDetails].[Form]![BitLockerPassword] & sLF
SBody = sBody & "If you have any issues / queries please contact the your Local HR hub." & sLF
Set myOlApp = CreateObject("Outlook.Application")
myOlApp.Session.Logon
Set myitem = myOlApp.CreateItem(0) ' myOlApp.CreateItemFromTemplate(CurrentProject.Path & "\TemplateFiles\EmailToHR.oft")
With myitem
.Body = olFormatHTML
.Subject = sSubject
.To = sTo
.HTMLbody = sBody
.display
end with
I haven't attempted to get your hyperlinks working at this point, but that is doable.
I'm not sure why you are opening a template when you say it is blank, that makes no sense, so I have simply created a fresh email.