Solved

Export email from Outlook to Access

Posted on 2011-09-26
15
220 Views
Last Modified: 2012-05-12
Hi Experts,

is there a way to export email from Outlook to Access.
What I need to do is export email with attachment to an access file. The attachment is supposed to be saved as a blob (Ole-object)

Thanks!
0
Comment
Question by:PerryDaynac
  • 6
  • 5
  • 4
15 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Can you explain a bit more about this?

Emails are outlook "Objects", so they cannot live inside of access directly.

(The attachment is supposed to be saved as a blob (Ole-object))
Not really the same thing.
You can have an image attached as an image, but I am not sure if it is possible to attach a "Blob" to an email directly.
So ifthis is an image file you will have to first extract the attachment, then convert it to a BLOB.
...Not very straightforward of simple.

So can you explain a bit more about this attachment?

0
 

Author Comment

by:PerryDaynac
Comment Utility
Sure boag2000. I was in a hurry when I posted the question yesterday... :)

What I want to do is import email messages (from Outlook) into a table in an Access file.
There are hundreds (maybe thousands) of emails with attachments that we need to get into a SQL Server database. However if we can get it to the Access database first then I think we have the solution for the Access -> SQL Server bit.

When I mentioned Blob it was from a programmers point of view. I want to get all messages from a folder i Outlook to an Access table with the attachment as well. But I think/hope there might be a better/easier option than to program the solution.

I have now tried to import "external data" to a Access table from a specific folder i Outlook. That works really good. However I have not really figured out what happens to attached files, and how to get them into the table.

Did it get any clearer? :)
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 400 total points
Comment Utility
I have never seen code that will do all of this in one felled swoop.

see here as a start:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23477618.html

Again not ethat "Emails" cannot be stored in Access.
Is it the attachment you need of the entire email?
0
 

Author Comment

by:PerryDaynac
Comment Utility
boag2000: It's not important to store the actual emails. Whats important is the attached file, "from email" and maybe subject (NOT email as an object).
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Like the link I posted, most code to extract the attachment will extract it to a file.

Your issue is much more complex in that you need this system to:
- Stored in a database.
- Somehow detect and update for any new emails.
- Possibly store the image as a "Blob"

A side not is that most times the "Link" to the file on the server is stored in the db, not the file itself.
This is because of basic Network theory of stoning "Files" in a central location.
The other reason is that getting the files "Out" of the DB, may prove just as complicated as getting them in.
0
 

Author Comment

by:PerryDaynac
Comment Utility
The files to be stored in the database are pdf and word files. We don't have the need for detect and update for any new emails, this is a one time job.
0
 
LVL 15

Expert Comment

by:David L. Hansen
Comment Utility
I hate to be the naysayer, however, even if you are successful in accomplishing your aim, you need to realize the following:

1. You are trying to create a document management system.  These are usually thousands of dollars.  Simple document management systems have been, and continue to be, build in-house by various groups, but the time and energy needed to build one is never trivial.

2. You are attempting to create a searchable email archiving system.  This is even more demanding of a task that the document management system.  Can you do it yourself? Perhaps.  Again, off-the-shelf systems are very expensive and they are so for a reason: email archiving, indexing and retrieval is tough.

We're here to help.  I just don't want the expectation to be that your request be solved/implemented within a few hours.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
sl8rz,

Good points...

This is none of those things where is easy to get all the bits of code together to do each part individually...
The challenge will be integrating all of them into something "Custom".

But being that this is a one shot deal, it probably needn't be pretty or graceful...
;-)


Jeff
0
 

Author Comment

by:PerryDaynac
Comment Utility
sl8rz:
Thank you for your input.
I am not trying to do a document management system, our company sells one. I am trying to get a work around to get data in to that system.

We (as a company) have two choices:
1) either we say to our customer that they need to get their thousands of customers to post their pdf's and word documents again (some will probably do that, some won't) and we look bad.
2) We find a solution and we look good.

I am a programmer and have done the blob thing before, however since my work doesn't involve programming at the moment I wanted to find an "easier" way :-)
0
 
LVL 15

Assisted Solution

by:David L. Hansen
David L. Hansen earned 100 total points
Comment Utility
If you can use a tool like boag2000 is talking about, to extract the attachments to a central location AND rename the files with key information about the sender, date, attachment_name, etc. I think you're home free.  You see, then you can iterate through those files and extract key data from the file's name to insert in the SQL Database.  Scrapping the info from the names and inserting them into the database would be easy; but, getting the files out of the emails and renaming them with the key info is the tough part...maybe boag2000 has some ideas on that?  But as I said, the rest is easy.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
The link I posted covers one way that this can be done.

As always, there are multiple techniques, so anyone can Google:
    "Extract Email attachment to a file"
...and get a few different approaches
0
 
LVL 15

Expert Comment

by:David L. Hansen
Comment Utility
How goes the endeavor?
0
 

Author Comment

by:PerryDaynac
Comment Utility
I would have liked an answer where I don't need to program :)
Seems it wont happen...

I'll give boag2000 most of the points for the link...
0
 

Author Closing Comment

by:PerryDaynac
Comment Utility
I'm giving a grade lower than A because I was looking for a solution that didn't involve programming like I specified in the question.
0
 
LVL 15

Expert Comment

by:David L. Hansen
Comment Utility
Sorry for not having a non-programmable solution for you....I really can't see how that could be done.  Anyway, did you get it working?
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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: …

728 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

10 Experts available now in Live!

Get 1:1 Help Now