Search folder

  • Thread starter Thread starter Semut
  • Start date Start date
S

Semut

Hello,

How do i know if a selected MAPIFolder is a folder of the search folders
through programatically?


thanks
 
Try to get its Folders collection. It won't have one:

On Error Resume Next
Set colFolders = mySearchFolder.Folders
If Err <> 0 Then
' mySearchFolder is a search folder
End If
 
I don't know how to tell that using Outlook object model code, but using CDO
1.21 or Extended MAPI or Redemption (www.dimastr.com/redemption) you could
look at PR_FOLDER_TYPE (0x36010003) and if the value is 2 (FOLDER_SEARCH)
you have a search folder. A normal folder is 1 (FOLDER_GENERIC).
 
thanks

Ken Slovak - said:
I don't know how to tell that using Outlook object model code, but using
CDO 1.21 or Extended MAPI or Redemption (www.dimastr.com/redemption) you
could look at PR_FOLDER_TYPE (0x36010003) and if the value is 2
(FOLDER_SEARCH) you have a search folder. A normal folder is 1
(FOLDER_GENERIC).
 
thanks

Try to get its Folders collection. It won't have one:

On Error Resume Next
Set colFolders = mySearchFolder.Folders
If Err <> 0 Then
' mySearchFolder is a search folder
End If
 
Hey, nice trick, Sue. I always check it using a MAPI property but this does
it in the OOM. Cool.




Try to get its Folders collection. It won't have one:

On Error Resume Next
Set colFolders = mySearchFolder.Folders
If Err <> 0 Then
' mySearchFolder is a search folder
End If
 
Back
Top