title image


Smiley Re: Outlook-Mails in Access einlesen
Da muss ich ja wieder in die Schatzkiste greifen...



hier ist Subject glaube ich EBAY









Dim db As DATABASE

Dim rs As Recordset

Set db = CurrentDb

Set rs = db.OpenRecordset("SELECT * FROM DeineTabelle")

Set objOutlook = New Outlook.Application

Set objNameSpace = objOutlook.GetNamespace("MAPI")

Set objMailordner = objNameSpace.GetDefaultFolder(olFolderInbox)

Set objGAINMailordner = objMailordner.Folders("OrdnerName")

'Set objMail = objGAINMailordner.Items // wenn aus einem anderen Ordner als Posteingang importiert wird

Set objMail = objMailordner.Items



For Each objEMail In objMail

If Left(objEMail.Subject, 4) = " Ebay" Then

rs.AddNew

If Not objEMail.Subject = "" Then rs.Fields("Betreff") = objEMail.Subject

rs.Fields("Anlagen") = objEMail.Attachments.count

If Not objEMail.ReceivedByName = "" Then rs.Fields("An") = objEMail.ReceivedByName

rs.Fields("Erhalten") = objEMail.ReceivedTime

If Not objEMail.ReplyRecipientNames = "" Then rs.Fields("Von") = objEMail.ReplyRecipientNames

If Not objEMail.BCC = "" Then rs.Fields("BCC") = objEMail.BCC

If Not objEMail.CC = "" Then rs.Fields("CC") = objEMail.CC

If Not objEMail.Body = "" Then rs.Fields("Inhalt") = objEMail.Body

rs.Update

'Email verschieben

objEMail.Move objGAINMailordner

End If

Next





geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: