AdvancedSearch with shared contact folder

O

oferc

Hi,
I'm trying to use the AdvancedSearch on a shared contacts folder,
but fail.
here is a code snipper of what I'm doing:

Set myOlApp = CreateObject("Outlook.application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myRecipient = myNamespace.CreateRecipient("A, b") ' A, b is
sharing
Set myFolder = myOlApp.Session.GetSharedDefaultFolder(myRecipient,
olFolderContacts)

strFolderPath = myFolder.FolderPath
strScope = "SCOPE ('shallow traversal of " _
& Chr(34) & strFolderPath & Chr(34) & "')"

Set olsearch = myOlApp.AdvancedSearch(strScope,
"urn:schemas:contacts:eek: LIKE 'xyz'") ' this function call is failing

Thanks in advance,

Ofer

Research & Technology Intiatives
SAP Labs Israel
 
S

Sue Mosher [MVP-Outlook]

AdvancedSEarch works only on folders in the Folder List. You can't use it
with GetSharedDefaultFolder.
 
Top