By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

Send email with attachments from Outlook to Access 2007

P: 33
Hi - Is it possible to send email attachments to an Access Database. I know that we can collect data using email messages. It would be nice if there was a way to send an email with an attachment and the attachment gets saved in a database. Do you guys have any suggestions/thoughts. Thanks for your help.

Jul 31 '10 #1
Share this Question
Share on Google+
5 Replies

P: 579
Hi Stan,

Don't quote me on this, but I think you can setup an AutoRule in Outlook to run a script when email messages arrive. Once the email arrives, the script can open an instance of a database using either DAO or ADO and you should be able to manipulate the attachment.

I can post an example of automating Access and using DAO if you want, but I haven't done anything with saving attachments. You may want to check out Sue Mosher's Outlook web site ('s got all kinds of info on just about everything Outlook.

Hope this helps at least get you started...
Aug 1 '10 #2

P: 33
Hi Beacon - I have been researching your suggestion over the weekend and I think I may be able to achieve what I am looking for. Please go ahead and post an example of automating Access and using DAO. I will let you guys know if I am able to succeed in this.Thanks again for the post.

Aug 2 '10 #3

P: 579
I don't claim to be an expert on this, so I can only take you so far. The following code will only help you insert a row in a table. As for the content, you'll have to check out the documentation for Outlook to find the VBScript to go with it.

Expand|Select|Wrap|Line Numbers
  1. DbOpenTable = 1
  3. Set Dbe = Application.CreateObject("DAO.DBEngine.36")
  4.     Set MyDB = Dbe.Workspaces(0).OpenDatabase("C:\Temp\db1.mdb")
  5. Set RS = MyDB.OpenRecordSet("tblTable", DbOpenTable)
  7. RS.AddNew
Aug 2 '10 #4

Expert Mod 10K+
P: 14,534
I should point out here that in my opinion it is never a good idea to embed objects like email attachments in Access. Normal practice would be to save those objects elsewhere on your system (set up a folder for this purpose) and only insert a path or hyperlink to the file in your record.

Aug 4 '10 #5

P: 33
Thanks Mary for the suggestion. I really hope that I don't waste time on saving these attachments to a hard drive first. I wish there was an easy way to just forward these emails to database from where I can retrieve (filter it using a PO, or item number or some other field)it anytime. I thought of using SharePoint at one time, however my IT dept says it's not the best option either. They are talking about using a package called 'KnowledgeLake'... Anyways, thanks for all the help.

Aug 11 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.