logging incoming emails

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an interesting problem that I'm confident someone can help me with. I
monitor an email inbox for incoming emails from my customers. I manually log
information from each email that comes in. I'm logging information like the
senders name, the time recieved, and information in the subject line. I
manually put this information in an Excel spreadsheet.

What I would like to do is create an Access database that will pull this
information into a table. Is this possible?
 
hi Hlewis,

You can write VBA code to read email from a mail server and store the read
information in MS Access tables.

If your email client is MS Outlook you can also link to it in MS Access.

Regards,
 
Sounds great but I have no clue how to do that. Can you provide more details
on you suggestion?
 
In the VBEditor, you have to go to Tools, References and tick M/soft Outlook
Object Library. You can then write Outllok code (I'll include a simple
example that makes an email from an Access database). To get the specific
code you need, have a look around the Outlook Programming community and tack
it onto your declared Outlook objects.

Sub myEmail(address, subject)
On Error GoTo handler
Dim myOut As New Outlook.Application
Dim myItem As Outlook.MailItem

Set myItem = myOut.CreateItem(olMailItem)
myItem.Recipients.Add address
myItem.subject = subject
myItem.Display
Exit Sub

handler:
If Err.Number = 287 Then
MsgBox "Email cancelled"
Exit Sub
Else
MsgBox Err.Number & vbNewLine & Err.Description
End If

End Sub
 
Back
Top