The Web Object

Before you can work on a Web, you must open it. This is done with the Webs collection's Open method. The syntax is:

Webs.Open(WebUrl, UserName, Password)

WebURL is the base URL of the Web to open. It can specify a local Web root folder, such as c:\MyWebs\Products, or the URL of a remote Web, as in http://www.YourFirm.com. The UserName and Password arguments are optional and provide the user name and password needed to access the Web server, if they are required.

To create a new Web, use the Webs collection's Add method. The syntax is

Webs.Add(WebUrl, UserName, Password)

WebURL is the base URL where the Web will be stored. The UserName and Password arguments are optional and provide the user name and password required to access ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.