Laurel Buchanan
asked on
Need help with HTML Email from Access
We're trying to create an automated email from an Access 2003 database and can't get the date in the email formatted the way we'd like. We want the dates in the email to be formatted like this - Tuesday, Jan. 30 or something close to that. I've attached the email as it currently is created and the code is below. Any help with this would be greatly appreciated.
With CreateObject("Outlook.Application").CreateItem(0)
.to = "renatewiegert@lakewoodhealthsystem.com"
.Subject = "New Hire - " & Me.Parent.First & " " & Me.Parent.Last & " "
' Set body format to HTML
' .BodyFormat = 2
' Format the message
.HTMLbody = _
"<html><font face = Arial>" & _
"<b>" & _
"New Hire: " & "</b>" & " " & Me.Parent.First & " " & Me.Parent.Last & "" & "<br><br>" & _
"<b>" & _
"Position/Dept: " & "</b>" & " " & Me.Parent.Position & " " & Me.Parent.Dept & "" & "<br><br>" & _
"<b>" & _
"Manager: " & "</b>" & " " & Me.Parent.Mgr & " " & "<br><br>" & _
"<b>" & _
"Pre-employment Date: " & "</b>" & " " & Me.DS_date & " " & "<br><br>" & _
"<b>" & _
"          Drug Screen: " & "</b>" & " " & Me.DS_time & " " & "<br>" & _
"<b>" & _
"          PT Screen: " & "</b>" & " " & Me.PT_time & " " & "<br>" & _
"<b>" & _
"          EH Paperwork: " & "</b>" & " " & Me.EH_pwtime & " " & "<br>" & _
"<b>" & _
"          HR Paperwork: " & "</b>" & " " & Me.HR_pwtime & " " & "<br><br>" & _
"<b>" & _
"START/ Dept Orientation: " & "</b>" & " " & Me.Start_date & " " & "<br><br>" & _
"<b>" & _
"Link - Emp - Orientation Workspace: " & "<a href=""" & "http://vappmoss/sites/LakeNet/workingatlhs/default.aspx" & """>" & "click Here" & "</a > " & "<br><br>" & "Link - Emp - Orientation Checklist: " & "<a href=""" & "http://vappmoss/sites/LakeNet/Supervisor/Supervisor Forms/Orientation/Department Orientation Checklist.doc" & """>" & "Department Orientation Checklist" & "</a > " & "<br><br>" & _
"General Orientation: " & "</b>" & " " & Me.GO_day2 & " " & "<br><br>" & _
"VIP: " & "</b>" & " " & Me.VIP_assg & " " & "<br>" & _
"</html>"
' Display Email
.display
SendKeys "^+{END}", True
SendKeys "{END}", True
SendKeys "{END}", True
SendKeys "{Enter}", True
SendKeys "%ng{enter}", True 'equivalent to Alt iNsert siGnature ENTER for default signature
End With
New-Hire-Email--.msg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
to insert the signature if you already have it automatically
is to display first, read the signature and add it to your text
to insert the signature if you already have it automatically
is to display first, read the signature and add it to your text
.Display
signature = .HTMLBody
.HTMLBody = "Your Text" & vbNewLine & signature
Regards
ASKER
Thank you for the additional information!!!
You're welcome
ASKER
Is there a way to issue you additional points for the extra info? If so, I'd like to do so!
You could open a new question
and then I could answer it
Regards
and then I could answer it
Regards
ASKER