Link to home
Start Free TrialLog in
Avatar of Laurel Buchanan
Laurel BuchananFlag for United States of America

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>" & _
                "&nbsp &nbsp &nbsp &nbsp &nbsp Drug Screen: " & "</b>" & " " & Me.DS_time & " " & "<br>" & _
                "<b>" & _
                "&nbsp &nbsp &nbsp &nbsp &nbsp PT Screen: " & "</b>" & " " & Me.PT_time & " " & "<br>" & _
                "<b>" & _
                "&nbsp &nbsp &nbsp &nbsp &nbsp EH Paperwork: " & "</b>" & " " & Me.EH_pwtime & " " & "<br>" & _
                "<b>" & _
                "&nbsp &nbsp &nbsp &nbsp &nbsp 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

Open in new window

New-Hire-Email--.msg
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Laurel Buchanan

ASKER

Awesome!  Thanks!!!!
Avatar of Rgonzo1971
Rgonzo1971

Hi,

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 

Open in new window

Regards
Thank you for the additional information!!!
You're welcome
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