Returning an Object from a Collection
SharePoint Designer Developer Reference |
The Item property returns a single object from a collection. The following statements set the fileOne
variable to a WebFile object that represents the first file in the WebFiles collection.
Note
All collections in the Microsoft Office SharePoint Designer object model are zero-based, so you access the first item in the collection by using a zero.
|
The Item property is the default property for most collections, so you can omit the Item keyword as shown in the following statement.
|
Named objects
Although you can usually specify an integer value with the Item property, it may be more convenient to return an object by name. The following example edits a file named Web Sales.htm in the active Web page.
|