Webmasters, gagnez de l'argent en affichant des bannières contextuelles Oxado
SourceForge.net Logo
Support This Project Free Downloads
WABAccess Project
Welcome ! [ Home ]  ·  [ Downloads ]  ·  [ Forums ]  ·  [ News ]  ·  [ Documentations ]  
[ Home ]

[ Documentations ]

NewDl Method


The NewDl method create a new Distribution List object.

Syntax :

Set objNewDl = objElements.NewDl( [showWindow] [, Name] [, parentWindow] [, createFlag] )

Applies To : Elements

Parameters :
Name Type In / Out Required / Optional Description
showWindow Boolean In Optional If True (the default), display a window dialog box to prompt the user for enter information of the new Dl.
If False, the new Dl is created without asking information to user, but the parameter Name is Mandatory.
Name String In Optional This parameter is the PR_DISPLAY_NAME of the new Dl. The Name parameter is ignored unless showWindow is False.
parentWindow Long In Optional Specifies the parent window handle for the dialog box. A value of zero (the default) specifies that the dialog box should be application-modal. A value of 1 specifies that the currently active window is to be used as the parent window. The parentWindow parameter is ignored unless showWindow is True.
createFlag enumCreateFlag In Optional Value of type enumCreateFlag that specifies the flags that affect creation behavior. The createFlag parameter is ignored unless showWindow is False. The following flags may be set:
  • createNoCheck (default) : Indicates no check is made for duplicate entry
  • createCheckDupLoose : Indicates that duplicate entry checking be performed loosely, which returns more matches than setting strict duplicate entry checking with the flag createCheckDupStrict. For example, a provider can define a loose match as any two entries that have the same display name, while defining a strict match as any two entries that have the same display name and messaging address.
  • createCheckDupStrict : Indicates that duplicate entry checking be performed strictly, which returns fewer matches than setting loose duplicate entry checking with the flag createCheckDupLoose.
  • createReplace : Causes duplicate entries to replace existing entries within a container.
  • createMerge : Causes the existing properties on the entry to be updated with the new set of properties when a collision occurs. createMerge must be used in conjunction with the createReplace flag. The new properties replace any properties that exist in both versions of the contacts. Any properties that do not overlap are not affected, and are saved on the entry. The flag is useful if you want to update partial information on a contact.
Return Value :

On successful return, contains the new Dl object.

Details :

When you open the Session without an identity (EnableProfiles is False) the new distribution list is created in the shared contacts folder. If the user click on Cancel button the method raise the MAPI_E_USER_CANCEL error.

Example :
Dim objMyDl, objSession

Set objMyDl = objSession.Containers.Item(1).Elements.NewDl()

WABAccess