Avatar of Fordraiders
Flag for United States of America

asked on 

need to search the Subject in the Inbox folder under a specific store from MsAccess vba

I had this question after viewing From msAccess find correct email account in outlook.

' to find the right store or profile name
Dim colStores As Outlook.Stores
Dim oStore As Outlook.Store
Dim oRoot As Outlook.folder
 Set colStores = Outlook.Application.Session.Stores
 For Each oStore In colStores
     Set oRoot = oStore.GetRootFolder
         'Debug.Print (oRoot.FolderPath)
         'Debug.Print oRoot
  If oRoot = "redbook" Then
' now that i know i'm in the right store. I need to search for a phrase  "Action Required" under the Inbox folder

end if
OutlookMicrosoft AccessVBA

Avatar of undefined
Last Comment

8/22/2022 - Mon