WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR
OWN RISK. Microsoft provides this code "as is" without warranty of any
kind, either express or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
If you want to remove the contents of an existing folder, and create a new folder of the same name, delete the folder and then recreate it.
For example, the following code deletes a folder named MyFolder (which also removes the content of the folder) and then creates a folder of the same name:
Sub RemoveContents()
ActiveWeb.RootFolder.Folders.Delete ("MyFolder")
ActiveWeb.RootFolder.Folders.Add ("MyFolder")
End Sub