Share via


SelectedFolders Property

Returns an array of WebFolder objects representing the selected folders.

expression.SelectedFolders

*expression   * Required. An expression that returns a WebWindowEx object.

Remarks

You must have Folders view open in Microsoft FrontPage in order to select multiple folders and you must use the right pane to select the folders. From Folders view, you can select multiple folders in a single Web site or in multiple Web sites. If you must use Page view, you can only select one folder per Web site from the folders in the left pane.

Note   If you're programmatically selecting folders, you can use the fpWebViewFolders constant of the ViewMode property to set the view to Folders view.

Example

The following example concatenates the names of the selected folders.

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 WebWindowEx
    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

Applies to | WebWindowEx Object