SelectedFolders Property Example

This example concatenates the names of the selected folders into a variable called mySelName.

Note   The delimiter used to separate the folder names in the variable mySelName is a space.

Private Sub GetSelectedFolderNames()
Dim myWebWindows As WebWindows
Dim myWebWindow As WebWindow
Dim mySelFolders As Variant
Dim mySelFolder As WebFolder
Dim mySelName As String
Dim myCount As Integer

Set myWebWindows = WebWindows

mySelFolders = ActiveWebwindow.SelectedFolders

For myCount = 0 To UBound(mySelFolders)
    Set mySelFolder = mySelFolders(myCount)
    mySelName = mySelName & " " & mySelFolder.Name
Next
End Sub