FolderItemVerbs.Item method

Retrieves the FolderItemVerb object for a specified item in the collection.


retVal = FolderItemVerbs.Item(


iIndex [in]

Type: Variant

The zero-based index of the item to retrieve. This value must be less than the value of the Count property.

Return value

Type: IDispatch**

Object that receives the FolderItemVerb object.


The following example uses Item to retrieve the first verbs in the collection available to the Control Panel folder and displays its name. Proper usage is shown for JScript, VBScript, and Visual Basic.


<script language="JScript">
    function fnFolderItemVerbsItemJ()
        var objShell = new ActiveXObject("shell.application");
        var objFolder2;
        var ssfCONTROLS = 3;
        objFolder2 = objShell.NameSpace(ssfCONTROLS);

        if (objFolder2 != null)
            var objVerbs;
            objVerbs = objFolder2.Self.Verbs();
            if (objVerbs != null)
                var objFolderItemVerb;
                objFolderItemVerb = objVerbs.Item(0);
                if (objFolderItemVerb != null)


<script language="VBScript">
    function fnFolderItemVerbsItemVB()
        dim objShell
        dim objFolder2
        dim ssfCONTROLS
        ssfCONTROLS = 3
        set objShell = CreateObject("shell.application")
        set objFolder2 = objShell.NameSpace(ssfCONTROLS)
        if (not objFolder2 is nothing) then
            dim objVerbs
            set objVerbs = objFolder2.Self.Verbs

            if (not objVerbs is nothing) then
                dim objFolderItemVerb
                set objFolderItemVerb = objVerbs.Item(0)

                if (not objFolderItemVerb is nothing) then
                end if

                set objFolderItemVerb = nothing
            end if

            set objVerbs = nothing
        end if

        set objFolder2 = nothing
        set objShell = nothing
    end function

Visual Basic:

Private Sub fnFolderItemVerbsItemVB()
    Dim objShell    As Shell
    Dim objFolder2  As Folder2
    Dim ssfCONTROLS As Long
    ssfCONTROLS = 3
    Set objShell = New Shell
    Set objFolder2 = objShell.NameSpace(ssfPROGRAMS)

    If (Not objFolder2 Is Nothing) Then
        Dim objVerbs As FolderItemVerbs
        Set objVerbs = objFolder2.Self.Verbs

        If (Not objVerbs Is Nothing) Then
            Dim objFolderItemVerb As FolderItemVerb
            Set objFolderItemVerb = objVerbs.Item(0)

            If (Not objFolderItemVerb Is Nothing) Then
                Debug.Print objFolderItemVerb.Name
            End If

            Set objFolderItemVerb = Nothing
        End If

        Set objVerbs = Nothing
    End If

    Set objFolder2 = Nothing
    Set objShell = Nothing
End Sub


Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Shell32.dll (version 4.71 or later)