Hi, I have been playing about with making an email import routine a lot more automated.
My Access code works great, extract below
I wrongly presumed I would be able to add all my new shiny outlook “user defined fields” to the access code. For example rstmessages!ImportedCID = c.CleintID
The access vba Intellisense doesn’t list it and I can’t find any examples on the forum
Is this possible or have I missed something?
My Access code works great, extract below
Code:
Set objItems = cf.Items
nummessages = objItems.Count
If nummessages <> 0 Then
DoEvents
For i = 1 To nummessages
Forms!frmImporter.lblwarn.Caption = "Processing item " & i & " of " & nummessages
Forms!frmImporter.Repaint
If TypeName(objItems(i)) = "MailItem" Then
Set c = objItems(i)
rstmessages.AddNew
rstmessages.AddNew
rstmessages!ImportedEntryID = c.EntryID
rstmessages!ImportedStamp = Now()
rstmessages!ImportedSender = c.SenderEmailAddress
rstmessages!ImportedSenderName = c.SenderName
rstmessages!ImportedFrom = c.Sender
rstmessages!ImportedTo = c.To
rstmessages!ImportedSubject = c.Subject
rstmessages!ImportedBody = c.Body
rstmessages!ImportedBodyHtml = c.HTMLBody
rstmessages!ImportedMessageSize = c.Size
rstmessages!ImportedImportance = c.Importance
rstmessages!ImportedAttachments = c.Attachments.Count
rstmessages!Received = c.DateSent
rstmessages!ImportedDateSent = c.SentOn
rstmessages.Update
' now look at attachments per email message as it loop into the tblTempImportedEmailattachment table
If c.Attachments.Count > 0 Then
For X = 1 To c.Attachments.Count
MyFileName = c.Attachments.Item(X).FileName
rstfiles.AddNew
rstfiles!ImportedEntryID = c.EntryID
I wrongly presumed I would be able to add all my new shiny outlook “user defined fields” to the access code. For example rstmessages!ImportedCID = c.CleintID
The access vba Intellisense doesn’t list it and I can’t find any examples on the forum
Is this possible or have I missed something?