Share via


Webs Collection Object

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Application
Aa190251.parchild(en-us,office.10).gifWebs

A collection of WebEx objects. Each WebEx object represents a web on a Web server which can either be disk-based (on a local hard drive) or server-based. The WebEx object is a member of the Webs collection.

Using the Webs Collection

Use the Webs property to return the Webs collection. You can also use the Application property to returns the Application object. The following statement uses the Application object to return the first item in the Webs collection or use the second statement to return the entire collection of webs.

  Set myWebOne = Application.Webs(0)
Set myWebs = Application.Webs

Use Webs(index), where index is the index number of an item in the Webs collection, to return a single WebEx object. The following statement returns the third web in the collection of open WebEx objects.

  Set myGetWebThree = Webs(2)

Use the Add method to add an item to the list of available items in the Webs collection. The following statement adds the Rogue Cellars web to the Webs collection.

  Webs.Add("C:\My Documents\My Webs\Rogue Cellars")

Use the Application property to return information about the application from within the Webs collection. The following statement returns the version number of the Application object.

  ActiveWeb.Webs.Application.Version

Use the Count property to return the number of open webs in the Webs collection. The following statement returns the number of open webs.

  Webs.Count

Use the Delete method to permanently delete a web from the Webs collection. The following statement deletes the Rogue Cellars web.

  Webs.Delete("C:\My Documents\My Webs\Rogue Cellars")

Use the Open method to open a web. The following statement opens a web and adds it to the collection of items in the Webs collection.

  Webs.Open("C:\My Documents\My Webs\Rogue Cellars")

Use the Parent method when you want to return the container of the Webs collection, which is the application. The following statement returns the Application object.

  Set myParent = Webs.Parent