Outlook 2003 VBA - AdvancedSearch in a personal folder (*.pst data file)
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:
PrivateSub Demo() Dim objSearchAs Search Const strWhatAsString = "urn:schemas:mailheader:subject ='Test'" Set objSearch = Application.AdvancedSearch(strWhere, strWhat) End Sub |
Now I have tried to change to constant 'strWhere' to search in a *.pst data file like this:
strWhere = "\\Archive_2005" strWhere = "Archive_2005" strWhere = "P:\Outlook\Archive_2005.pst"'original path |
In each above cases I have received a runtime error.
Is somebody here who know how I can do that?
Thanks for your efforts.

