Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drag & drop Outlook 2007 email into Access 2007 database

Posted on 2012-04-09
18
Medium Priority
?
1,025 Views
Last Modified: 2012-04-29
I'd like to create an Access 2007 form with a field that can store Outlook 2007 emails. I'd like to be able to drag and drop the email onto the form and have the whole email stored (not just the header). Is there any reasonably simple way to do this, or perhaps some add-in that would help?
0
Comment
Question by:BlearyEye
[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
  • 9
  • 7
  • 2
18 Comments
 
LVL 21
ID: 37825979
Here is a previous post on the subject: http://www.tek-tips.com/viewthread.cfm?qid=1346884
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37826343
Why not "link" to the inbox:
(External data-->Import-->More-->Outlook Folders-->Link to the data...)
... and avoid going through all the trouble of:
1. adding Drag and drop functionality
2. storing redundant data
...etc

Even if you could "store" the email in Access, how would keep the data synchronized with outlook?
How would you manage Replies, Forwards, Receipts, BCC/CC, ...etc

JeffCoachman
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37827895
boag2000: What I want to do is keep a permanent record of certain discussions. So whenever there's something new on a particular discussion thread, I want to store it separately. I could just save the emails to a folder somewhere, but I'd rather have them better organized.

TheHiTechCoach: I saw that link and tried it. It errored out on the first line of code since there was nothing called "Outlook".
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 21
ID: 37828063
<<TheHiTechCoach: I saw that link and tried it. It errored out on the first line of code since there was nothing called "Outlook".>>

I did try the code once and it does work. IIRC, the code is using early binding. This mean that you have to set a reference to the Outlook library in the VBA editor.

Did you try setting a reference for Outlook?

About storing messages, I have also saved emails as a .msg file and then stored them in a database.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37828351
I am still not sold on the idea of creating duplicated data...
...or perhaps I am not understanding your request...

In any event, I'll back out now and let you continue on with TheHiTechCoach

JeffCoachman
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37838761
Jeff ... well, I'm using Outlook with pop3. That means that the .pst is local on my computer. All kinds of things can happen to the file and its contents. I want to create an external record for particular items that document the discussion leading to a particular decision.

Anyway ...  TheHiTechCoach: I added the reference  (to Microsoft Outlook 12.0 Object Library). The code runs. I get confirmation via the MsgBox, and can run it in debug mode. However, what I'm left with is just some info about the file (such as "From      To      Subject      Received      Size      E-mail Account      
noreply@timewarnercable.com      Registration Confirmation      10:06 AM      10 KB"), not the email itself.

I've attached the database in case you want to take a look at it.
Database1.accdb
0
 
LVL 21
ID: 37839197
BlearyEye,

Archiving emails is  becoming critical. I have seen  products on the market that handle this.  Also making backups for your outlook data file is critical.  Hopefully you are doing daily backups for the outlook data already.

I will take a look at your attached database and get back to you.

If you are wanting to capture other data about the email message then It may be best to not use drag and drop but link to the Outlook data.
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37839416
Yes, I do backup my Outlook files. What I want to save in the database is the email itself, including headers. I'd like to be able to click on an entry and see the whole thing.

Linking to Outlook (which ties it to my local machine) means I wouldn't be able to share this database offline (such as sending by email).
0
 
LVL 21
ID: 37839624
<<Linking to Outlook (which ties it to my local machine) means I wouldn't be able to share this database offline ... >>

You would use the  link to the Outlook file only for importi9ng. Once the data is in the database then  the link is no longer used.  Once in the database you can easily share it.

<(such as sending by email)>>
Not sure what you mean by this.


The more I learn about what you are doing I would highly recommend that you look into using Exchange Server. It does everything you are want to do now plus a lot more in the way of collaboration.
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37839877
I didn't understand what you were suggesting with linking ... what you're describing is fine.
0
 
LVL 21
ID: 37840081
Linking to the Outlook data is a way to gaining a connection to the data so it can be imported. Then you can drop the link. Similar to linking to an Excel file to import the data into  a database.
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37840160
I get the idea, thanks. So, you're going to look at the database and suggest how to do it, right?
0
 
LVL 21
ID: 37840387
Yes. I will take a look.
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37863551
Any update?
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 2000 total points
ID: 37868985

Anyway ...  TheHiTechCoach: I added the reference  (to Microsoft Outlook 12.0 Object Library). The code runs. I get confirmation via the MsgBox, and can run it in debug mode. However, what I'm left with is just some info about the file (such as "From      To      Subject      Received      Size      E-mail Account      
noreply@timewarnercable.com      Registration Confirmation      10:06 AM      10 KB"), not the email itself.

I've attached the database in case you want to take a look at it.

What are you selecting and dragging?

If I open and email message. Select all the text. Drag the text.  Drop it on the text box on your form. What appears is the selected text I dragged.  

I also dragged message for the list of messages and I got what you described.  

AFAIK, this is all that Outlook is design to handle.   What you are running up against is a limit on Outlook's  ability to send data on a drag operation.  Not Access's ability to accept what is dropped on it.

I normally work with Outlook through automation via Access. I have only sent data to Outlook from Access. I have not tried to retrieve data from Outlook.  

If I were to attempt this I would use either Outlook automation or link to the Outlook data.

This should  help you get started: http://www.blueclaw-db.com/read_email_access_outlook.htm
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 37871456
I want more than the text; I also want the headers. So I was clicking from the list of messages.

Thanks for the link and the suggestion; I'll take a look.
0
 
LVL 1

Assisted Solution

by:BlearyEye
BlearyEye earned 0 total points
ID: 37889559
The answer to my original question is "maybe". I'll close this, with credit to TheHiTechCoach.
0
 
LVL 1

Author Closing Comment

by:BlearyEye
ID: 37907557
I included my comment because the answer is "maybe"; TheHiTechCoach gave a pointer that may work.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

722 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