Folder.Name 属性(Outlook)Folder.Name property (Outlook)

返回或设置一个 String 值,该值代表对象的显示名称。Returns or sets a String value that represents the display name for the object. 读/写。Read/write.

语法Syntax

表达式名称expression.Name

_表达式_一个代表Folder对象的变量。expression A variable that represents a Folder object.

示例Example

本 Visual Basic for Applications (VBA)示例使用Name属性获取在活动资源管理器中显示的文件夹的名称。This Visual Basic for Applications (VBA) example uses the Name property to obtain the name of the folder displayed in the active explorer.

Sub DisplayCurrentFolderName() 
 
 Dim myExplorer As Outlook.Explorer 
 
 Dim myFolder As Outlook.Folder 
 
 
 
 Set myExplorer = Application.ActiveExplorer 
 
 Set myFolder = myExplorer.CurrentFolder 
 
 MsgBox myFolder.Name 
 
End Sub

另请参阅See also

文件夹对象Folder Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.