Compartir a través de


Propiedad Folder.Title

Contiene el título de la carpeta.

Esta propiedad es de solo lectura.

Sintaxis

strTitle = Folder.Title

Valor de propiedad

Cadena que contiene el título del objeto.

Comentarios

Nota

No todos los métodos se implementan para todas las carpetas. Por ejemplo, el método ParseName no se implementa para la carpeta Panel de control (CSIDL_CONTROLS). Si intenta llamar a un método no implementado, se produce un error de 0x800A01BD (decimal 445).

 

Ejemplos

En el ejemplo siguiente se usa Title para recuperar el título de la carpeta que contiene los grupos de programas del usuario (normalmente "Programas"). Se muestra un uso adecuado para JScript, VBScript y Visual Basic.

Jscript:

<script language="JScript">
    function fnFolderTitleJ()
    {
        var objShell    = new ActiveXObject("shell.application");
        var objFolder;
        var ssfPROGRAMS = 2;
        
        objFolder = objShell.NameSpace(ssfPROGRAMS);
        if (objFolder != null)
        {
            alert(objFolder.Title);
        }
    }
</script>

Vbscript:

<script language="VBScript">
    function fnFolderTitleVB()
        dim objShell
        
        set objShell = CreateObject("shell.application")
        if (not objShell is nothing) then
            dim objFolder
            dim ssfPROGRAMS
            
            ssfPROGRAMS = 2
            set objFolder = objShell.NameSpace(ssfPROGRAMS)
            if (not objFolder is nothing) then
                alert(objFolder.Title)
            end if
            set objFolder = nothing
        end if
        set objShell = nothing
    end function
 </script>

Visual Basic:

Private Sub fnFolderTitleVB()
    Dim objShell    As Shell
    Dim objFolder   As Folder
    Dim ssfPROGRAMS As Long
            
    ssfPROGRAMS = 2
    Set objShell = New Shell
    Set objFolder = objShell.NameSpace(ssfPROGRAMS)
    If (Not objFolder Is Nothing) Then
        Debug.Print objFolder.Title
    End If
    Set objFolder = Nothing
    Set objShell = Nothing
End Sub

Requisitos

Requisito Value
Cliente mínimo compatible
Windows 2000 Professional, Windows XP [solo aplicaciones de escritorio]
Servidor mínimo compatible
Windows 2000 Server [solo aplicaciones de escritorio]
Encabezado
Shldisp.h
IDL
Shldisp.idl
Archivo DLL
Shell32.dll (versión 4.71 o posterior)