![]() |
|
Outlook 2033 - detect if Exchange is available
I can't locate any objects that will let me know whether Exchange is / can
be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
A crude way would be to just to look for the registry key -
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Exc hange Provider - if the default is null, then it's not available I guess? I'd like a more elegant way, if it's available. -- IL Thomas "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I
am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
Dmitry, thank you for your reply.
At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
I still wouldn't limit my app's market because of that - e.g. a couple of my
address book providers return AddressEntry.Manager just fine even though my own address book is used, not GAL. In this case EX gives you more, not less, so there is absolutely no reason to introduce an artificial limitation. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry, thank you for your reply. At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
Dmitry
OK, point taken. I guess that means getting the CDOEX redistributable. I see that it's installed on my system (I assume that Microsoft CDO for Exchange 2000 Library (cdosys.dll) at ' %windir%\system32\cdosys.dll , v6.2.2.0 - 2,067,968 bytes - is the thing). I don't have Exchange installed, so I assume it was placed there by Office 2003 installation - is that right? Although i'm convinced I'm better off using VSTO and .NET 2.0 and I assume that the Office 2003 PIAs includes CDOEX, if I were to code in say VB6 where would I get the CDOEX redistributable? I had a quick look at your website and yu've certainly extended and made easier some of the arcane Outlook / Exchange object models. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... I still wouldn't limit my app's market because of that - e.g. a couple of my address book providers return AddressEntry.Manager just fine even though my own address book is used, not GAL. In this case EX gives you more, not less, so there is absolutely no reason to introduce an artificial limitation. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry, thank you for your reply. At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
Dmitry - I'm struggling here!
How can I use the PR_MDB_PROVIDER property? (see ' *********************** below) For testing, I'm playing around using VB.NET, .NET 2.0 - I have something like this - Imports Outlook = Microsoft.Office.Interop.Outlook ' For registry keys Imports System.Diagnostics Imports Microsoft.Win32 ' Just experimenting Imports MAPI.CdoPropTags ' Module Module1 Function isExchangeInstalled() As Boolean Dim Value As Object = "" ReadRegistry(Registry.LocalMachine, _ "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) Dim sMsg As String = "" If Value = "" Then sMsg = "(NULL)" isExchangeInstalled = False Console.WriteLine("Exchange is NOT installed on this machine") Else sMsg = Value.ToString isExchangeInstalled = True End If End Function Sub Main() ' We don't want the hassles of running this on a machine connected (or even offline) to an Exchange Server If isExchangeInstalled() = True Then Exit Sub End If ' Create Outlook application Dim oApp As Outlook.Application = New Outlook.Application() ' Get Mapi NameSpace and Logon Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI") oNS.Logon(Missing.Value, Missing.Value, True, True) ' I have no idea how to use this, and the following snippet crashes of course ' ************************************************** ********* ' PR_MDB_PROVIDER ' MAPI.CdoPropTags Dim prv As MAPI.InfoStore ' = Nothing If prv.ProviderName.ToString = CdoPR_MDB_PROVIDER Then ' compiler doesn't like this MsgBox("provider") End If ' ************************************************** ********* ..... etc .... (all the rest just looks at Contacts, DistLists, enumerates the members, etc) End Sub ' Main End Module -- Ian Thomas "Dmitry Streblechenko" wrote in message ... I still wouldn't limit my app's market because of that - e.g. a couple of my address book providers return AddressEntry.Manager just fine even though my own address book is used, not GAL. In this case EX gives you more, not less, so there is absolutely no reason to introduce an artificial limitation. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry, thank you for your reply. At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
CDOEX is nether used nor installed by Outlook.
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry OK, point taken. I guess that means getting the CDOEX redistributable. I see that it's installed on my system (I assume that Microsoft CDO for Exchange 2000 Library (cdosys.dll) at ' %windir%\system32\cdosys.dll , v6.2.2.0 - 2,067,968 bytes - is the thing). I don't have Exchange installed, so I assume it was placed there by Office 2003 installation - is that right? Although i'm convinced I'm better off using VSTO and .NET 2.0 and I assume that the Office 2003 PIAs includes CDOEX, if I were to code in say VB6 where would I get the CDOEX redistributable? I had a quick look at your website and yu've certainly extended and made easier some of the arcane Outlook / Exchange object models. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... I still wouldn't limit my app's market because of that - e.g. a couple of my address book providers return AddressEntry.Manager just fine even though my own address book is used, not GAL. In this case EX gives you more, not less, so there is absolutely no reason to introduce an artificial limitation. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry, thank you for your reply. At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
PR_MDB_PROVIDER is only accessible using Extended MAPI (C++ or Delphi), CDO
1.21 or Redemption. Outlook Object Model won't help since it does not provide access to the arbitrary MAPI properties. Have a look at stores/folders/messages with MFCMAPI or OutlookSpy plugRedemption explicitly exposes RDOStore.StoreKind enum property (http://www.dimastr.com/redemption/rdo/rdostore.htm)/plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry - I'm struggling here! How can I use the PR_MDB_PROVIDER property? (see ' *********************** below) For testing, I'm playing around using VB.NET, .NET 2.0 - I have something like this - Imports Outlook = Microsoft.Office.Interop.Outlook ' For registry keys Imports System.Diagnostics Imports Microsoft.Win32 ' Just experimenting Imports MAPI.CdoPropTags ' Module Module1 Function isExchangeInstalled() As Boolean Dim Value As Object = "" ReadRegistry(Registry.LocalMachine, _ "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) Dim sMsg As String = "" If Value = "" Then sMsg = "(NULL)" isExchangeInstalled = False Console.WriteLine("Exchange is NOT installed on this machine") Else sMsg = Value.ToString isExchangeInstalled = True End If End Function Sub Main() ' We don't want the hassles of running this on a machine connected (or even offline) to an Exchange Server If isExchangeInstalled() = True Then Exit Sub End If ' Create Outlook application Dim oApp As Outlook.Application = New Outlook.Application() ' Get Mapi NameSpace and Logon Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI") oNS.Logon(Missing.Value, Missing.Value, True, True) ' I have no idea how to use this, and the following snippet crashes of course ' ************************************************** ********* ' PR_MDB_PROVIDER ' MAPI.CdoPropTags Dim prv As MAPI.InfoStore ' = Nothing If prv.ProviderName.ToString = CdoPR_MDB_PROVIDER Then ' compiler doesn't like this MsgBox("provider") End If ' ************************************************** ********* .... etc .... (all the rest just looks at Contacts, DistLists, enumerates the members, etc) End Sub ' Main End Module -- Ian Thomas "Dmitry Streblechenko" wrote in message ... I still wouldn't limit my app's market because of that - e.g. a couple of my address book providers return AddressEntry.Manager just fine even though my own address book is used, not GAL. In this case EX gives you more, not less, so there is absolutely no reason to introduce an artificial limitation. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry, thank you for your reply. At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
Outlook 2033 - detect if Exchange is available
Yes, in what is presented below I am using CDO 1.21 - as the "Imports
MAPI.CdoPropTags" line shows. ' .NET Assemblies showing as MAPI: Microsoft CDO 1.21 Library ' .NET Assemblies showing as CDO: Microsoft CDO for Windows 2000 Library (I haven't attempted to set a refernce to the latter) C++ is too foreign for me. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... PR_MDB_PROVIDER is only accessible using Extended MAPI (C++ or Delphi), CDO 1.21 or Redemption. Outlook Object Model won't help since it does not provide access to the arbitrary MAPI properties. Have a look at stores/folders/messages with MFCMAPI or OutlookSpy plugRedemption explicitly exposes RDOStore.StoreKind enum property (http://www.dimastr.com/redemption/rdo/rdostore.htm)/plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry - I'm struggling here! How can I use the PR_MDB_PROVIDER property? (see ' *********************** below) For testing, I'm playing around using VB.NET, .NET 2.0 - I have something like this - Imports Outlook = Microsoft.Office.Interop.Outlook ' For registry keys Imports System.Diagnostics Imports Microsoft.Win32 ' Just experimenting Imports MAPI.CdoPropTags ' Module Module1 Function isExchangeInstalled() As Boolean Dim Value As Object = "" ReadRegistry(Registry.LocalMachine, _ "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) Dim sMsg As String = "" If Value = "" Then sMsg = "(NULL)" isExchangeInstalled = False Console.WriteLine("Exchange is NOT installed on this machine") Else sMsg = Value.ToString isExchangeInstalled = True End If End Function Sub Main() ' We don't want the hassles of running this on a machine connected (or even offline) to an Exchange Server If isExchangeInstalled() = True Then Exit Sub End If ' Create Outlook application Dim oApp As Outlook.Application = New Outlook.Application() ' Get Mapi NameSpace and Logon Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI") oNS.Logon(Missing.Value, Missing.Value, True, True) ' I have no idea how to use this, and the following snippet crashes of course ' ************************************************** ********* ' PR_MDB_PROVIDER ' MAPI.CdoPropTags Dim prv As MAPI.InfoStore ' = Nothing If prv.ProviderName.ToString = CdoPR_MDB_PROVIDER Then ' compiler doesn't like this MsgBox("provider") End If ' ************************************************** ********* .... etc .... (all the rest just looks at Contacts, DistLists, enumerates the members, etc) End Sub ' Main End Module -- Ian Thomas "Dmitry Streblechenko" wrote in message ... I still wouldn't limit my app's market because of that - e.g. a couple of my address book providers return AddressEntry.Manager just fine even though my own address book is used, not GAL. In this case EX gives you more, not less, so there is absolutely no reason to introduce an artificial limitation. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... Dmitry, thank you for your reply. At present, I want to limit my small application to non-Exchange environments. Also, I probably need to detect Outlook version (2000/XP/2003 would be the versions). I have great troubles with finding and understanding the documentation of Outlook, compared with other Office products. I will have to check out your website. I'm finding some problems distinguishing properties for (for example) AddressBook that are Exchange-only vs single-user (not Exchange-connected), such as Outlook.AddressEntry.Manager Right now, my crude way to see if the user's Outlook is NOT Exchange-connected is to check the registry using a simple .NET routine based on System.Diagnostics and Microsoft.Win32 ReadRegistry(Registry.LocalMachine, "SOFTWARE\Microsoft\Exchange\Exchange Provider", "(Default)", Value) and just check the value it returns. -- Ian Thomas "Dmitry Streblechenko" wrote in message ... On the Extended MAPI level, you can look at the PR_MDB_PROVIDER propperty. I am not sure I unxdderstand why you want to make a distinction - for all practical purposes, caches Exchange mode is not at all different from PST. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "gxdata" wrote in message ... I can't locate any objects that will let me know whether Exchange is / can be connected to Outlook 2003. I want to deal only with a single-user (ie, not / never connected to Exchange), so that I know to use local Contacts folders and not to use offline or other Exchange-type addresslists etc. I'm using VB.NET but anything that points me to a solution in VBA or .NET would be much appreciated. -- IL Thomas |
All times are GMT +1. The time now is 11:35 AM. |
|
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com