473,385 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Send email with attachments from Outlook to Access 2007

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.

Stan
Jul 31 '10 #1
5 4290
beacon
579 512MB
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 (www.outlookcode.com...it's got all kinds of info on just about everything Outlook.

Hope this helps at least get you started...
Aug 1 '10 #2
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.

Stan
Aug 2 '10 #3
beacon
579 512MB
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
  2.  
  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)
  6.  
  7. RS.AddNew
  8.  
Aug 2 '10 #4
MMcCarthy
14,534 Expert Mod 8TB
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.

Mary
Aug 4 '10 #5
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.

stan
Aug 11 '10 #6

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

Similar topics

4
by: roni | last post by:
i dont like to use ocx controlx. is there new dll for vb.net that do the job ? or newer code, to send email throught outlook express.
6
by: ErwinF | last post by:
Hi there, I would like to know the following: How to send send email attachments using WebDAV in VB .NET? Sample code please................... Thanks for your help.
2
by: diwadube2003 | last post by:
I get a Warning message while automatically sending email through MS Access, using Outlook. Can anybody help me out with this.
2
by: Andy | last post by:
Hi, I have a C# application. In part of it, users can define distribution lists, which is basically an email group. To actually send the email, I've been using Process.Start with a mailto:...
4
by: VoodooFrog | last post by:
I am trying to run the following code as a simple test of adding an attachment through access 2007: Dim rsJob As DAO.Recordset2 Dim rsChild As DAO.Recordset2 Dim field As Field2 ...
1
by: mike11d11 | last post by:
I am using this code to create an email to send automaticaly in my program, the only problem is I get the security warning and I just want the email to go out on its own without the warning. I...
1
by: zivon | last post by:
now for the bigger problam :) I know you pepole hate using OE for sending emails, but its user friendly and its needed in this case... I found on this forum, a code that sends email using OE...
4
by: sam12 | last post by:
Hi I wana send Email with attached pdf files from my ms access 2000 ,os win 2000 via outlook express without confirmation . I googled a lot Tried so many codes but that didn't work Thank in...
0
by: Bibin | last post by:
I want to send email via Outlook Express and not by Outlook in VB.NET (windows application). I also want to attach files with the email. The mail (in Outlook Express) needs to be displayed before...
15
by: KendraAsh | last post by:
I am trying to do the exact same thing; I want to create a button on my form in Access 2007 that, when clicked, opens a new email in Outlook with only the To: field filled in. I tried the code...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.