B
Benjamin Strautin
I have a regular Exchange mailbox and several PST files, and am able to use
the GUI to create working search folders for both the mailbox and the PSTs.
I can also use the Search object's Save method to create a search folder in
my Exchange mailbox. However, when I try to use Search.Save in a PST, I get
this error:
Run-time error '-2147221241 (80040107)':
The operation failed. An object could not be found.
' This code works: ("Mailbox - Strautin, Benjamin" is my mailbox)
strFolder = "'\\Mailbox - Strautin, Benjamin'"
strSearch = """urn:schemas:httpmail:subject"" like '%foo%'"
Application.AdvancedSearch(strFolder, strSearch).Save "foo"
' This code fails: ("Archive Folders" is a PST)
strFolder = "'\\Archive Folders'"
strSearch = """urn:schemas:httpmail:subject"" like '%foo%'"
Application.AdvancedSearch(strFolder, strSearch).Save "foo"
the GUI to create working search folders for both the mailbox and the PSTs.
I can also use the Search object's Save method to create a search folder in
my Exchange mailbox. However, when I try to use Search.Save in a PST, I get
this error:
Run-time error '-2147221241 (80040107)':
The operation failed. An object could not be found.
' This code works: ("Mailbox - Strautin, Benjamin" is my mailbox)
strFolder = "'\\Mailbox - Strautin, Benjamin'"
strSearch = """urn:schemas:httpmail:subject"" like '%foo%'"
Application.AdvancedSearch(strFolder, strSearch).Save "foo"
' This code fails: ("Archive Folders" is a PST)
strFolder = "'\\Archive Folders'"
strSearch = """urn:schemas:httpmail:subject"" like '%foo%'"
Application.AdvancedSearch(strFolder, strSearch).Save "foo"