Item Property

       

Item property as it applies to the Lists object.

Returns a List object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the ListFields object.

Returns a ListField object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the MetaTags object.

Returns a Variant representing a property key/value pair.

expression.Item(PropertyKey)

expression   Required. An expression that returns one of the above objects.

PropertyKey  Required String. Required String. A string that contains an index number of the collection. The index starts at zero.

Item property as it applies to the NavigationNodes object.

Returns a NavigationNode object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the PageWindows object.

Returns a PageWindowEx object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the Themes object.

Returns a Theme object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the Properties object.

Returns or sets a Variant that represents a property. Read/write.

expression.Item(PropertyKey)

expression   Required. An expression that returns one of the above objects.

PropertyKey  Required String. A string that contains an index number of the collection. The index starts at zero.

Item property as it applies to the Webs object.

Returns a WebEx object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the WebFiles object.

Returns a WebFile object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the WebFolders object.

Returns a WebFolder object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Item property as it applies to the WebWindows object.

Returns a WebWindowEx object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Variant. The name or ordinal value of the object within the collection.

Example

As it applies to the NavigationNodes Collection.

The following example demonstrates returning a value by indexing an item in the collection. This example returns the label for the first navigation node in the navigation structure of the active web.

Note   You access the NavigationNodes collection through the Children property of the RootNavigationNode property of the active web.

 Private Sub GetNavigationNode()
    Dim myWeb As WebEx
    Dim myNavNodes As NavigationNodes
    Dim myNavNodeLabel As String

    Set myWeb = ActiveWeb

    myNavNodeLabel _
        = myWeb.RootNavigationNode.Children.Item(0).Label
End Sub

As it applies to the MetaTags object.

The following statement returns the contents of a META tag that exists on a web page in the active web, and demonstrates the PropertyKey argument.

myMetaTagContents _
    = ActiveWeb.RootFolder.Files.Item(0).MetaTags.Item("generator")

It isn't always necessary to specify the index or property name of the Item property when returning values from a collection. The following example returns a list of file names of each web page that contains a META tag name equivalent to "generator" in the active web, without specifying the Item property. FindGeneratorTags retrieves a list of the files that contain the "generator" META tag and adds value of the Item property to the variable myMetaTag, because in this case the value of the Item property is the same as the file name. This is different from the previous example, which returned the contents of the "generator" META tag.

Function FindGeneratorTags() As String

    Dim myWeb As WebEx
    Dim myMetaTags As MetaTags
    Dim myMetaTag As Variant
    Dim myFiles As WebFiles
    Dim myFile As WebFile
    Dim myMetaTagName As String
    Dim myReturnFileName As String

    Set myWeb = ActiveWeb
    Set myFiles = myWeb.RootFolder.Files

    With myWeb
        For Each myFile In myFiles
            Set myMetaTags = myFile.MetaTags
                For Each myMetaTag In myMetaTags
                    myMetaTagName = myMetaTag
                    If myMetaTagName = "generator" Then
                        myReturnFileName = myReturnFileName & myFile.Name
                    End If
                Next
        Next
    End With
    FindGeneratorTags = myReturnFileName
End Function