Folder2.OfflineStatus property

Contains the offline status of the folder.

This property is read-only.

Syntax

iOfflineStatus = Folder2.OfflineStatus

Property value

An Integer that is set to one of the following values.

(OFS_DIRTYCACHE)

Server is online with unsynchronized changes.

(OFS_INACTIVE)

Offline caching is not enabled for this folder.

(OFS_OFFLINE)

Server is offline.

(OFS_ONLINE)

Server is online.

(OFS_SERVERBACK)

Server is offline but can be reached.

Remarks

Note

Offline Files must be enabled through Folder Options for OfflineStatus to work correctly. If the Offline Files option is not enabled, the property returns OFS_INACTIVE.

 

Examples

The following example shows the proper use of OfflineStatus for JScript, VBScript, and Visual Basic.

JScript:

<script language="JScript">
    function fnOfflineStatusJ()
    {
        var objShell   = new ActiveXObject("shell.application");
        var objFolder2 = new Object;
        
        objFolder2 = objShell.NameSpace("\\\\server\\share\\folder");
        if (objFolder2 != null)
        {
            var nReturn;

            nReturn = objFolder2.OfflineStatus;
        }
    }
</script>

VBScript:

<script language="VBScript">
    function fnOfflineStatusVB()
        dim objShell
        dim objFolder2
       
        set objShell = CreateObject("shell.application")
        set objFolder2 = objShell.NameSpace("\\server\share\folder")

        if (not objFolder2 is nothing) then
            dim nReturn

            nReturn = objFolder2.OfflineStatus
        end if

        set objFolder = nothing
        set objShell = nothing
    end function
</script>

Visual Basic:

Private Sub fnOfflineStatusVB()
    Dim objShell   As Shell
    Dim objFolder2 As Folder2
    
    Set objShell = New Shell
    Set objFolder2 = objShell.NameSpace("\\server\share\folder")

    If (Not objFolder2 Is Nothing) Then
        Dim nReturn As Integer
        
        nReturn = objFolder2.OfflineStatus()
    End If

    Set objFolder2 = Nothing
    Set objShell = Nothing
End Sub

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Shldisp.h
IDL
Shldisp.idl
DLL
Shell32.dll (version 5.0 or later)

See also

Folder2

Folder