Solved

Drag & drop Outlook 2007 email into Access 2007 database

Posted on 2012-04-09
18
978 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
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.

 
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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

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