Dim varSearchTerm as String
Perhaps shorten the first string search in the subject as indicated with a *wildcard. (is an attachment in the subject?) And concate the end string in the varSearchTerm with a wildcard either side of this one. No 2nd wildcard needed if all total strings end the same way.
Regarding wildcard concated around a string in a generic formula as in your example
"" & varSearchTerm & "" Is a technique in standalone Excel formulas. Wildcard stars are omitted from inside the two sets of speech marks when posted.