![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Well I wabt to ask all of you AND IF
ANYONE KNOWS TO LET ME KNOW: Is there any way to insert mail strings to a database without doing copy paste each one a time? The strings are a request from a form! Unfortunately those mail was received before we made a method so they are inserted at once in the data base. |
#2
|
|||
|
|||
![]()
This is a very general question! The Outlook Object Model and ADO libraries
provides all the plumbing you need to read from Outlook and write to a database. Can you be more specific please? -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ " wrote: Well I wabt to ask all of you AND IF ANYONE KNOWS TO LET ME KNOW: Is there any way to insert mail strings to a database without doing copy paste each one a time? The strings are a request from a form! Unfortunately those mail was received before we made a method so they are inserted at once in the data base. |
#3
|
|||
|
|||
![]()
I have a huge number of emails, which including text is sth like that:
name: tonia occupation: unemployed married: no education: college (this is just a sample which is similar to mine so you can understand who thing goes) Now all these mails i want to insert them into an MS Access database in table with that kind of construction: column1 -- name column2 -- occupation column3 -- married column4 -- education All i'm asking is if that huge number of mails, can be inserted into the base, because the manually way it will take "years". Well now I hope you could understand what kind of problem do i have! |
#4
|
|||
|
|||
![]()
There is very much possible. Below is an example of reading all e-mails in
the current folder and creating a new record in an Access database using DAO. You can easily modify it to parse the message body to get the field/value combinations you want, or switch to using ADO instead: Sub WriteEmailToDatabase() Dim objFolder As Outlook.MAPIFolder, objItems As Outlook.Items Dim objEmail As Outlook.MailItem, objMessageObj As Object Dim dbsThis As DAO.Database, rstThis As DAO.Recordset Set dbsThis = DAO.OpenDatabase("C:\Documents and Settings\elegault\Desktop\db1.mdb") Set rstThis = dbsThis.OpenRecordset("Table1", dbOpenDynaset) Set objFolder = Application.ActiveExplorer.CurrentFolder Set objItems = objFolder.Items For Each objMessageObj In objItems If objMessageObj.Class = olMail Then Set objEmail = objMessageObj 'SAVE TO ACCESS DATABASE rstThis.AddNew rstThis("Subject") = objEmail.Subject rstThis("Body") = objEmail.Body rstThis.UPdate End If Next End Sub -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ " wrote: I have a huge number of emails, which including text is sth like that: name: tonia occupation: unemployed married: no education: college (this is just a sample which is similar to mine so you can understand who thing goes) Now all these mails i want to insert them into an MS Access database in table with that kind of construction: column1 -- name column2 -- occupation column3 -- married column4 -- education All i'm asking is if that huge number of mails, can be inserted into the base, because the manually way it will take "years". Well now I hope you could understand what kind of problem do i have! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Export e-mail strings to database | nemesis345crew@gmail.com | Outlook and VBA | 0 | May 22nd 06 03:32 PM |
Automate export of Appointment Insert/Update/Delete infomation to the database | cookiesncreamychoc@hotmail.com | Add-ins for Outlook | 2 | March 14th 06 03:59 AM |
export mail account settings | Jack | Outlook Express | 6 | January 13th 06 02:15 AM |
Export / save mail rule | Wayne S | Outlook Express | 2 | January 10th 06 07:41 AM |