DLName 属性

       

返回或设置通讯组列表的显示名称。String 类型,可读写。

expression.DLName

expression  必选。该表达式返回 DistListItem 对象。

示例

本 Microsoft Visual Basic/Visual Basic for Applications 示例创建新通讯组列表,然后提示用户输入该通讯组列表的名称。

Dim myOlApp As New Outlook.Application
Dim myDistList As Outlook.DistListItem
Set myDistList = myOlApp.CreateItem(olDistributionListItem)
myDistList.DLName = InputBox("Type the name of the new distribution list.")
myDistList.Display

如果使用 VBScript,则不创建 Application 对象,而且也不能使用命名常量。本示例说明如何使用 VBScript 执行相同任务。

Set myDistList = Application.CreateItem(7)
myDistList.DLName = _
    InputBox("Type the name of the new distribution list.")
myDistList.Display