Delete Method (WebFolder) Example

This example deletes a folder from the active web.

Note   To run this example, you must have a file called "C:\My Documents\My Webs\TempFolder" (for a server running on Microsoft Windows) or "C:\WINNT\Profiles\logon alias\Personal\My Webs\TempFolder" (for a server running on Windows NT). In either case, you may substitute an alternative web folder.

Private Sub DeleteFolder()
Dim myFolder As WebFolder

Set myFolder = ActiveWeb.RootFolder.Folders("TempFolder")
myFolder.Delete

End Sub