My code isn't working because emails are being forwarded to subfolders with a rule.
I cannot remove this rule nor make any rules on this computer.
I realized that newMailEx is probably the answer to my problems. Would there be a way to convert my code to run off of that instead of item_add?
Private WithEvents Items As Outlook.Items
Private Sub Application_Startup()
Dim olApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Set olApp = Outlook.Application
Set objNS = olApp.GetNamespace("MAPI")
Set Items = objNS.Folders.Item("Data").Folders.Item("Inbox").Items
End Sub
Private Sub Items_ItemAdd(ByVal Item As Object)
Dim Msg As Outlook.MailItem
If TypeOf Item Is Outlook.MailItem Then
'''code to check subject lines and do various things to attachments for the various cases
End If
End Sub