find if DistListItem exist

M

Magohamoth

Hello,

How can i realize this ?

sFilter = "[Name] = '" & DLName & "'"
FDistListItem = FFolderContact.Items.Find(sFilter)

Thank's
 
S

Sue Mosher [MVP-Outlook]

Put the Set keyword in front of your second statement and test the result:

Set FDistListItem = FFolderContact.Items.Find(sFilter)
If FDistListItem Is Nothing Then
' it doesn't exist
End IF
 
Top