I am using VBA (MS Access) to automate parsing of emails in a mailbox. When I try to get the sender name (.SenderName) or (.SenderEmailAddress) I get that $%#%%& annoying "....is trying to access email address...." Outlook warning.
I was using a linked table in Access to read the message info from the Inbox but the EntryID is not shown in the table. I need the EntryID to move the message to another folder. I was using the subject line to move items but some messages and times are exact.
I can't use any 3rd party add-in either.
Thanks in advance for any assistance.
Code:
Set objOutlook = CreateObject("Outlook.Application")
Set objNS = objOutlook.GetNamespace("MAPI")
Set objActiveFolder = objNS.Folders("Outlook").Folders("Inbox")
On Error Resume Next
For i = 1 To objActiveFolder.Items.Count
Set objItem = objActiveFolder.Items(i)
strFrom = objItem.SenderName
Next i
I was using a linked table in Access to read the message info from the Inbox but the EntryID is not shown in the table. I need the EntryID to move the message to another folder. I was using the subject line to move items but some messages and times are exact.
I can't use any 3rd party add-in either.
Thanks in advance for any assistance.