?
Solved

Import Email From Outlook to Access in RTF

Posted on 2011-03-09
3
Medium Priority
?
463 Views
Last Modified: 2012-06-21
When importing an email from outlook into an access table the formatting on the email is lost.

I have the memo filed in the table set to RTF however the outlook object "Mailobject.Body" only seems to pull in the clear text format.

Any suggestions?
Set OlApp = CreateObject("Outlook.Application")
    Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFolderInbox)
     
    Set rstAddEmail = CurrentDb.OpenRecordset("tblInvestigationEmails")
    Set rstAddAttachment = CurrentDb.OpenRecordset("tblInvestigationAttachments")

        Set Mailobject = OlApp.ActiveExplorer.Selection(1)

        With rstAddEmail
            On Error Resume Next
            .AddNew
            !DateAdded = Now
            !EmailNumber = strEmailNumber
            !Subject = Mailobject.Subject
            !From = Mailobject.SenderName
            !To = Mailobject.To
            !Body = Mailobject.Body
            !DateSent = Mailobject.SentOn
            .Update
            'Mailobject.Read = True
        End With

Open in new window

0
Comment
Question by:MikeMcEvoy
[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
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 35084993
try:
!Body = Mailobject.HTMLBody
0
 
LVL 2

Author Comment

by:MikeMcEvoy
ID: 35085037
Works perfect. Thanks!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35085104
;-)
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

764 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