SelectedFiles Property Example

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

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

Private Sub GetSelectedFileNames()
Dim myWebWindows As WebWindows
Dim myWebWindow As WebWindow
Dim mySelFiles As Variant
Dim mySelFile As WebFile
Dim mySelName As String
Dim myCount As Integer

Set myWebWindows = WebWindows

mySelFiles = ActiveWebwindow.SelectedFiles

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