Folders Property

       

Some of the content in this topic may not be applicable to some languages.

Returns the items in the WebFolders collection. Read-only.

Remarks

The Folders property returns the WebFolders collection for the specified web. To access the collection, you declare a variable of type WebFolders as in the statement, Dim myFolders As WebFolders, and then set the variable to Web.RootFolder.Folders.

Example

This example retrieves two of the properties of a folder and concatenates the data into a string with a pipe ("|") delimiter separating the data.

Note   The PropertyKeys shown in this example apply to a web created with the One Page Only Web Wizard. Other templates may use other PropertyKeys.

Private Sub GetFolderProperties()
    Dim myFolders As WebFolders
    Dim myFolder As WebFolder
    Dim myHasSubDirs As String
    Dim myIsScriptable As String
    Dim myProperties As Properties

    Set myFolders = ActiveWeb.RootFolder.Folders

    For Each myFolder In myFolders
            Set myProperties = myFolder.Properties
           
            myHasSubDirs = myHasSubDirs & _
                        myProperties("vti_ hassubdirs") & "|"
            myIsScriptable = myIsScriptable & _
                        myProperties("vti_ isscriptable") & "|"
    Next
End Sub