Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1048
  • Last Modified:

Drag & drop Outlook 2007 email into Access 2007 database

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
BlearyEye
Asked:
BlearyEye
  • 9
  • 7
  • 2
2 Solutions
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Here is a previous post on the subject: http://www.tek-tips.com/viewthread.cfm?qid=1346884
0
 
Jeffrey CoachmanCommented:
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
 
BlearyEyeAuthor Commented:
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
<<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
 
Jeffrey CoachmanCommented:
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
 
BlearyEyeAuthor Commented:
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
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
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
 
BlearyEyeAuthor Commented:
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
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
<<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
 
BlearyEyeAuthor Commented:
I didn't understand what you were suggesting with linking ... what you're describing is fine.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
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
 
BlearyEyeAuthor Commented:
I get the idea, thanks. So, you're going to look at the database and suggest how to do it, right?
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Yes. I will take a look.
0
 
BlearyEyeAuthor Commented:
Any update?
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:

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
 
BlearyEyeAuthor Commented:
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
 
BlearyEyeAuthor Commented:
The answer to my original question is "maybe". I'll close this, with credit to TheHiTechCoach.
0
 
BlearyEyeAuthor Commented:
I included my comment because the answer is "maybe"; TheHiTechCoach gave a pointer that may work.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 9
  • 7
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now