Add Method (WebFiles Collection)

See Also         Example         Applies To

Adds a new WebFile object to the list of available items in the WebFiles collection. A WebFile object can be any type of file, it is not restricted to an HTML file type—it could be an image file, a movie, or an executable file.

Note   Use this method to add a new file to a FrontPage-based web.

Syntax

expression.Add(FileUrl As String)

expression   Required. An expression that returns a Files collection object.

FileUrl   Required String. A string that contains the URL for the file such as "Inventory.htm". This can be any absolute URL for a file, such as http://web server/file or file://file system/file for disk-based webs.

Remarks

Accessing a single WebFile object through the WebFiles collection provides reference to a WebFile object that doesn't have access to the page object model until the web file is opened. Once the file is open, the PageWindow object associated with the file provides access to the page object model that is compatible with Microsoft Internet Explorer 4.0 and later. For further information on using the page object model in your web pages, see Exploring the Object Model in FrontPage.