473,462 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Receive Email Using Ms-Access and Outlook

Hai.
I needto Receive Email using Ms-Access and Outlook.

On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called “Save to Access”.

When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE


Here contact name and job name are in the access table fields. We go to select any one contact and any one job for the particular Email. Then the Email details are stored into a Access table.

There anybody help me for this...

Thanks
Tamilvanan
Apr 10 '07 #1
6 6886
Rabbit
12,516 Expert Mod 8TB
Hai.
I needto Receive Email using Ms-Access and Outlook.

On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called “Save to Access”.

When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE


Here contact name and job name are in the access table fields. We go to select any one contact and any one job for the particular Email. Then the Email details are stored into a Access table.

There anybody help me for this...

Thanks
Tamilvanan
What code have you tried so far?
Apr 10 '07 #2
ADezii
8,834 Expert 8TB
Hai.
I needto Receive Email using Ms-Access and Outlook.

On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called “Save to Access”.

When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE


Here contact name and job name are in the access table fields. We go to select any one contact and any one job for the particular Email. Then the Email details are stored into a Access table.

There anybody help me for this...

Thanks
Tamilvanan
You would need to create Automation code in Outlook in order to establish communications betwen the 2 Applications - not an easy task.
Apr 10 '07 #3
pks00
280 Expert 100+
Hi TamilVanan, personally I wouldnt keep prompting for each email received, it would be a right pain in the **** at times. Why dont u just customize the toolbar to run your macro?

Code itself is pretty straight forward, not much difficulty there
A number of ways to do it, here is one simple method.

Expand|Select|Wrap|Line Numbers
  1. Public Function SaveToAccess()
  2.  
  3.     Dim sContactName As String
  4.     Dim sJobName As String
  5.     Dim db As DAO.Database
  6.     Dim rs As DAO.Recordset
  7.  
  8.  
  9.     sContactName = InputBox("Enter Contact Name")
  10.     sJobName = InputBox("Enter Job Name")
  11.  
  12.     If sContactName = "" Or sJobName = "" Then
  13.         MsgBox "Listen, please try to enter both a contact and job!!!"
  14.         Exit Function
  15.     End If
  16.  
  17.     Set db = DBEngine(0).OpenDatabase("C:\TSDN\TSDN.mdb")
  18.     Set rs = db.OpenRecordset("tblStuff")
  19.     rs.AddNew
  20.     rs!ContactName = sContactName
  21.     rs!JobName = sJobName
  22.     rs.Update
  23.     rs.Close
  24.     Set rs = Nothing
  25. End Function
  26.  

to use DAO, u would need to add the reference to Microsoft DAO Object Library v3.6


other method, u could create access objects then issue a DoCmd.RunSQL command, just as easy except users need permissions to create objects
and of course the alternative to DAO is to use ADO
Apr 10 '07 #4
What code have you tried so far?

Hai. Am using the following code only for display the Content of mail in Access Form. But the Receive mails are got from Inbox folder at Outlook.

Private Sub Command0_Click()
command0 and a text field called text1
Dim objApp As Outlook.Application
Dim objItem As Outlook.MailItem
Dim SndName As String, SndAddr As String, ToName As String, CCName As String
Dim Subj As String, Rcvd As String, MsgBody As String, AtchName As String
Set objApp = New Outlook.Application
'For Each objItem In objApp.ActiveExplorer.Selection
For Each objItem In objApp.ActiveExplorer.Selection
If objItem.Class = olMail Then
With objItem
SndName = .SenderName
SndAddr = .SenderEmailAddress
ToName = .To
CCName = .CC
Subj = .Subject
MsgBody = .Body
Rcvd = .ReceivedTime

End With
End If
Next

Me.Text1 = MsgBody
Set objItem = Nothing
Set objApp = Nothing
End Sub


But i need,

On the receiving end(Outlook), the user receives the email at the Outlook. When they opens the Email at Outlook, the message box should have a button called “Save to Access”.

When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE

Here contact name and job name are two tables that already there in the access Application. We go to select any one contact and any one job for the particular Email. Then the Email details are stored into a Access table.


If u know how to do the functionalities, plese let me know.

Thanks
Tamilvanan
Apr 11 '07 #5
Rabbit
12,516 Expert Mod 8TB
As a start, the same way you Dim the Outlook application, you can do the same for an Access application and then open a database.
Apr 11 '07 #6
pks00
280 Expert 100+
From that code, what is it u want to store?
the example code Ive given shows u how u can add values to ms access

I am using prompts for contact and job, u can substitute this with other values
Apr 11 '07 #7

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

Similar topics

5
by: siliconmike | last post by:
How to set up my PC (or what tools do I need) so that when any email comes to the server, a php script is automatically run to parse the email ? I've never done this before. Later I would like...
4
by: Robert Rossney | last post by:
I'm trying to send and receive XmlDocument objects using the System.Messaging.dll functions. The code I've written follows, as best I can tell, the methodology used in the sample code for the...
6
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
2
by: Richard A. Wells | last post by:
All I wanted to do was implement a web service where I'd receive an XML document and return one in response. I'd already figured out how to use XmlReader and XmlWriter classes to do the XML work I...
2
by: Alper Akcayoz | last post by:
Hello Developpers, I faced with a problem during developping a TCP/IP Client application. The Client application will receive intensive data from Server. Client is receiving data by using the...
0
by: Peter | last post by:
I have a VB6 program which can receive Keydown events on an ActiveX control. The ActiveX control can't fire keydown events so I put a picturebox below the ActiveX control. I write codes in...
6
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
3
by: Jack | last post by:
I am trying to receive xml files on my server which are posted from another server using http post. I need help in designing a receiver which will accept this xml file and send back a success...
2
by: Vanessa Lee | last post by:
Hello, Is it possible to write a script using CONDTS object to read all emails from the SMTP IIS "Drop" folder without changing the username and email address in LogonSMTP? or is there...
16
by: s0suk3 | last post by:
I wanted to ask for standard ways to receive data from a socket stream (with socket.socket.recv()). It's simple when you know the amount of data that you're going to receive, or when you'll receive...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.