Solved

Need help with HTML Email from Access

Posted on 2014-02-06
7
293 Views
Last Modified: 2014-02-06
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
0
Comment
Question by:Laurel Buchanan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39839392
Hi,

Try to replace your dates

with
Format(YourDate, "dddd, mmm. dd")

Open in new window


eg.
Format(Me.DS_date, "dddd, mmm. dd") 

Open in new window

Regards
0
 

Author Closing Comment

by:Laurel Buchanan
ID: 39839410
Awesome!  Thanks!!!!
0
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 39839443
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
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:Laurel Buchanan
ID: 39839452
Thank you for the additional information!!!
0
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 39839461
You're welcome
0
 

Author Comment

by:Laurel Buchanan
ID: 39839531
Is there a way to issue you additional points for the extra info?  If so, I'd like to do so!
0
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 39839601
You could open a new question

and then I could answer it

Regards
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question