I'm trying to create a searchfolder in a personal folder (*.pst data file). But I don't know how to create them. I have used the advancedsearch method but it looks like as this method can only be used in the current email account and not in a *.pst data file.
this is my code to create a searchfolder object in the current email account:
Private Sub Demo()
Dim objSearch As Search
Const strWhat As String = "urn:schemas:mailheader:subject = 'Test'" Const strWhere As String = "Inbox"
Set objSearch = Application.AdvancedSearch(strWhere, strWhat) objSearch.Save "Demo"
Now I have tried to change to constant 'strWhere' to search in a *.pst data file like this: