View Single Post
  #7  
Old May 9th 06, 10:37 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Add ContactItems to DLItem with VBS

Something along the lines (off the top of my head):

on Error resume next
Err.Clear
set DL = MAPIFolder.Items("DL Name")
if Err.Number 0 Then
'the DL does not exist
Err.Clear
set DL = MAPIFolder.Items.Add("IPM.DistList")
DL.DLName = "DL Name"
End If
'do something here
DL.Save

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Christoph Fricke" wrote in message
oups.com...
Dmitry,

will you be so kind and give me clue how to accomplish the check for
the DL existence? I just want to create the DL if it does not exist and
go further with the membership add if it does exist...

Christoph



Ads