Offline Property

Microsoft Outlook Visual Basic

expression.Offline

expression    Required. An expression that returns a Namespace object.

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example returns True or False depending on whether the Namespace object is currently online.

Sub Off()
'Determines whether Outlook is currently offline.
    Dim olapp As Outlook.Application
    Dim nmsName As Outlook.NameSpace
    Set olapp = New Outlook.Application
    Set nmsName = olapp.GetNamespace("MAPI")
    MsgBox nmsName.Offline
End Sub