If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Exchange available - solution using CDO v1.21
VB.NET, requires reference to CDO v1.21 (MAPI)
Private Function ExchangePresent() As Boolean Dim sc As MAPI.SessionClass = New MAPI.SessionClass() ' This is a crude logon - I don't do it this way sc.Logon(Type.Missing, Type.Missing, Type.Missing, Type.Missing, _ Type.Missing, Type.Missing, Type.Missing) Dim isrs As MAPI.InfoStores = TryCast(sc.InfoStores, MAPI.InfoStores) Dim index As Integer=1 Do While index = CInt(Fix(isrs.Count)) If (CType(isrs.Item(index), _ MAPI.InfoStore)).ProviderName.ToString().ToUpper() .IndexOf("EXCHANGE") = 0 Then Return True End If index += 1 Loop Return False End Function -- IL Thomas |
Ads |
#2
|
|||
|
|||
Exchange available - solution using CDO v1.21
CDO 1.21 is not supported with .NET. While it may work most of the time on
most machines you will run into problems no one will support you with in use. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "gxdata" wrote in message ... VB.NET, requires reference to CDO v1.21 (MAPI) Private Function ExchangePresent() As Boolean Dim sc As MAPI.SessionClass = New MAPI.SessionClass() ' This is a crude logon - I don't do it this way sc.Logon(Type.Missing, Type.Missing, Type.Missing, Type.Missing, _ Type.Missing, Type.Missing, Type.Missing) Dim isrs As MAPI.InfoStores = TryCast(sc.InfoStores, MAPI.InfoStores) Dim index As Integer=1 Do While index = CInt(Fix(isrs.Count)) If (CType(isrs.Item(index), _ MAPI.InfoStore)).ProviderName.ToString().ToUpper() .IndexOf("EXCHANGE") = 0 Then Return True End If index += 1 Loop Return False End Function -- IL Thomas |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What will be the best solution? | wyca | Outlook - Using Contacts | 1 | July 27th 06 01:09 PM |
CDO and VB scripting install | ngan | Outlook - Installation | 1 | July 13th 06 02:43 PM |
CDO and SMTP Servers | [email protected] | Outlook and VBA | 3 | June 15th 06 09:55 PM |
mapi cdo service | [email protected] | Outlook - General Queries | 8 | February 20th 06 02:33 PM |
Do i need Exchange for CDO | A. Peters | Outlook and VBA | 4 | February 17th 06 11:52 PM |