473,320 Members | 1,979 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,320 software developers and data experts.

Outlook to Access databae

Hi

I am working on a projects called as "email mamagement", where we would like to capture all emails coming into a generic mailbox into a database. From here employee would work on the request and update appropriate fields.(Like from it has come, who has sent etc ).

I would like every new email to be updated into a Inbox table.
Everytime I run a new update query, all emails from the mailbox would move into the table. I would like to either move all unique emails into the database or delete duplicates which have entered into the database.

My aim is to reduce as much manual work as possible.

I would love to hear suggestions which would complete my projects.

Thank you so much in advance.
Lyndon
Oct 27 '06 #1
1 1861
Tanis
143 100+
I found this code that may be helpful to you. Havn't used it myself as we now use Lotus Notes. Can't vouch for it, but it might be worth a try.

Sub CommandButton1_Click()
Dim appAccess
Dim nms
Dim strFolder
Dim fld
Dim strAccessPath
Dim rst
Dim dbe
Dim wks
Dim dbs
Dim itms
Dim itm

Set nms = Application.GetNamespace("MAPI")
strFolder = "comtest"

Set fld = nms.Folders("Personal Folders").Folders(strFolder)

'Pick up path to Access database directory from Access SysCmd function

Set appAccess = CreateObject("Access.Application")
strAccessPath = appAccess.SysCmd(9)
'Get DAO version from DBEngine
strDBEngine = appAccess.Application.DBEngine.Version
'MsgBox "DBEngine version: " & strDBEngine
appAccess.Quit
If strDBEngine = "3.51" Then
'Office 97 DAO version
Set dbe = CreateObject("DAO.DBEngine.35")
strDBName = strAccessPath & "fbtestdb.mdb"
ElseIf strDBEngine = "3.6" Then
'Office 2000 DAO version
Set dbe = CreateObject("DAO.DBEngine.36")
strDBName = strAccessPath & "fbtestdb.mdb"
Else
MsgBox "Unknown Office version; canceling"
Exit Sub
End If

'MsgBox "DBName: " & strDBName
Set wks = dbe.Workspaces(0)
Set dbs = wks.OpenDatabase("C:\My Documents\comtest.mdb")

'Open Access table containing contact data
Set rst = dbs.OpenRecordset("Table1")

'Set up reference to Outlook folder of items to export
Set itms = fld.Items
ItemCount = itms.Count
If ItemCount = 0 Then
MsgBox "No Communication requests to export"
Exit Sub
Else
MsgBox ItemCount & " Communication requests to export"
End If

For Each itm In itms
rst.AddNew
'Custom Outlook properties

rst.Datecircular=itm.Sent
rst.subject =itm.Subject
rst.circular=itm.HTMLBody
rst.Update
Next

rst.Close
MsgBox "All communication requests exported!"
MsgBox "Quit Access"
appAccess.Quit


End Sub
Oct 27 '06 #2

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

Similar topics

3
by: Kurt | last post by:
Hi We are developing an off-the-shelf software suite for a certain business sector. Most of the program is simply a GUI on top of some .mdb files. Its a .net application written in c# One...
6
by: bala | last post by:
hi access guru's there is a requirement wherein i have to connect ms access frontend with sybase (backend). the data from the frontend should be saved in the table in sybase databae thro...
10
by: mbev | last post by:
I would like to have in a field a big amount of text with a size more than 64K. This field will have text and HTML tags. Is there a way to do this in access? Ok, I may be I need to explain myself...
1
by: Eva | last post by:
Can anyone plz direct me on a useful article on upgrading my access databae to a msde database. I also have a question. is msde a dbms just like access? is it simple to use like access? I...
2
by: Snig | last post by:
Hi I'm into creating a web application in C# (.NET Framework 1.1) which would list and manage the outlook tasks. If I try to do this in a Windows Application, it works fine. But there are...
26
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
2
by: mik.sjoblom | last post by:
Hello, I have developed a Access application that needs to read mail from Outlook, versions on Access and outlook are 2003. In the code i use mapi to connect to outlook. When i tries to read the...
3
by: bobdydd | last post by:
Hi Everybody Access 2000, Outlook 2000 Windows XP I am running the code below to open Microsoft Outlook from a Command Button. It works fine until I tried it on a machine that has Office...
2
by: Randy | last post by:
Hi,all I met one problem of connecting Access database in asp.net web program. I use ODBC link to Access, the connection string like "PWD=12345;DSN=QADLinkMDB;DriverId=25;MaxBufferSize=2048;FIL=MS...
6
by: Kevin | last post by:
In my business, I use Quickbooks extensively for billing and accounting and a custom built Access DB for project management. I recently began using MS Outlooks contacts quite extensively as well...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.