Solved

Drag & drop Outlook 2007 email into Access 2007 database

Posted on 2012-04-09
18
927 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
  • 9
  • 7
  • 2
18 Comments
 
LVL 21
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 21
Comment Utility
<<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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
<<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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 1

Author Comment

by:BlearyEye
Comment Utility
I didn't understand what you were suggesting with linking ... what you're describing is fine.
0
 
LVL 21
Comment Utility
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
Comment Utility
I get the idea, thanks. So, you're going to look at the database and suggest how to do it, right?
0
 
LVL 21
Comment Utility
Yes. I will take a look.
0
 
LVL 1

Author Comment

by:BlearyEye
Comment Utility
Any update?
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
Comment Utility

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
Comment Utility
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
Comment Utility
The answer to my original question is "maybe". I'll close this, with credit to TheHiTechCoach.
0
 
LVL 1

Author Closing Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now