• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 44. Managing Webs with VBA > Working with Folders

Working with Folders

Folders in a FrontPage-based web site are exposed in the WOM as WebFolder objects. Each WebFolder object exposes a Folders collection that contains all the subfolders contained in the WebFolder. The Folders collection also exposes methods to add and remove folders from the collection, as well as properties to access the folders and determine their number. For example, the following example creates three news folders in the current web and then displays the number of folders in the web.

    Dim theWeb As Web
Dim theFolder As WebFolder

Set theWeb = Webs.Add("c:\my webs\mynewweb")

With theWeb.RootFolder
    .Folders.Add ("folder1")
    .Folders.Add ("folder2")
    .Folders.Add ("folder3")
End With

MsgBox theWeb.RootFolder.Folders.Count


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint