다음을 통해 공유


Folder.FolderPath Property (Outlook)

Returns a String that indicates the path of the current folder. Read-only.

Version Information

Version Added: Outlook 2007

Syntax

expression .FolderPath

expression A variable that represents a Folder object.

Example

The following example displays information about the default Contacts folder. The subroutine accepts a Folder object and displays the folder's name, path, and address book information.

Sub Folderpaths() 
 
 Dim nmsName As NameSpace 
 
 Dim fldFolder As Folder 
 
 
 
 'Create namespace reference 
 
 Set nmsName = Application.GetNamespace("MAPI") 
 
 'create folder instance 
 
 Set fldFolder = nmsName.GetDefaultFolder(olFolderContacts) 
 
 'call sub program 
 
 Call FolderInfo(fldFolder) 
 
End Sub 
 
 
 
Sub FolderInfo(ByVal fldFolder As Folder) 
 
 'Displays information about a given folder 
 
 MsgBox fldFolder.Name & "'s current path is " & _ 
 
 fldFolder.FolderPath & _ 
 
 ". The current address book name is " & fldFolder.AddressBookName & "." 
 
End Sub

See Also

Concepts

Folder Object

Folder Object Members