I would like to search for email with subject "order 14567" in my current Outlook folder.
There is an error (438 - object doesn't support this properties or method.) incurred in the following code:
Set objSch = Application.AdvancedSearch(scope:=strS, _
Filter:=strF, Tag:=strTag)
VBA code:
Sub SearchInboxFolder()
'Searches the Inbox
Dim objSch As Search
Const strF As String = "urn:schemas:mailheader:subject = 'order 14567'"
Const strS As String = "Inbox"
Const strTag As String = "SubjectSearch"
Set objSch = Application.AdvancedSearch(scope:=strS, _
Filter:=strF, Tag:=strTag)
End Sub