Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is Outlook On-Line or Off-Line? (VBA/Word2000)

    I'm using Word2000 to access Outlook 2000 to look up addresses in any contacts folder that you may have access rights to. I do not know when the macro is executed whether the user will be on the network and have the Exchange server available or if the user will be working off-line. I'd like to disable some of my options if the user is working in off-line mode. Is there a way to test for this?

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is Outlook On-Line or Off-Line? (VBA/Word2000)

    I believe the trick is using the GetObject method on the Outlook application object. If it returns null
    Outlook is not running. That's not the same thing as being off-line though. The user could be on-line
    but not have Outlook running. In that case a CreateObject would succeed.

    set oOutlook = GetObject("Outlook.Application")
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Star Lounger
    Join Date
    Feb 2003
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is Outlook On-Line or Off-Line? (VBA/Word2000)

    Hmm, in the Outlook 11 beta I get a new property - ConnectionMode property of the Session object - options are olOnline, olOffline and olLowBandwidth. Sounds like exactly what you are after. Anyone have a OL2K version?

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Is Outlook On-Line or Off-Line? (VBA/Word2000)

    This thread <!post=about online status,120327>about online status<!/post> and more specifically the registry key
    HKEY_USERS.DEFAULTSoftwareMicrosoftWindowsCurrentV ersionInternet SettingsGlobalUserOffline
    might be good places to look.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Is Outlook On-Line or Off-Line? (VBA/Word2000)

    No such property in OL2k.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •