PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
How to detect Exchange?
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
How to detect Exchange?
![]() |
How to detect Exchange? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
Is there a way to programatically determine whether Outlook is running in an Exchange environment, or in a simple POP3/SMTP setup? More specifically, is there a way to find out whether the Redemption::MAPIUtils: eliverNow() will work as expected, or whether thesimulated click on the Send/Recv toolbar button is required? Thanks in advance! Martynas |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Using CDO 1.21 code:
Private Function Exchange() As Boolean Dim objInfostore As MAPI.InfoStore Dim objCDO As MAPI.Session On Error Resume Next Set objCDO = CreateObject("MAPI.Session") objCDO.Logon "", "", False, False Set objInfostore = objCDO.GetInfoStore(objCDO.Inbox.StoreID) If Not objInfostore Is Nothing Then If InStr(1, objInfostore.Fields(CdoPR_PROVIDER_DISPLAY), "Microsoft Exchange", _ vbTextCompare) > 0 Then Exchange = True Else Exchange = False End If Else Exchange = False End If Set objInfostore = Nothing End Function A quick and dirty way using the Outlook object model would be to get Inbox.Parent and see what the folder name is: If InStr(1, strFolderName, "Mailbox", vbTextCompare) > 0 Then 'using Exchange mailbox End If -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Lead Author, Professional Outlook 2000 Programming, Wrox Press Lead Author, Beginning VB 6 Application Development, Wrox Press Attachment Options http://www.slovaktech.com/attachmentoptions.htm Extended Reminders http://www.slovaktech.com/extendedreminders.htm "Martynas Kunigelis" <kunigelis@centras.lt> wrote in message news:#pi#2WiQDHA.3192@tk2msftngp13.phx.gbl... > Hi, > > Is there a way to programatically determine whether Outlook is running in an > Exchange environment, or in a simple POP3/SMTP setup? > > More specifically, is there a way to find out whether the > Redemption::MAPIUtils: eliverNow() will work as expected, orwhether the > simulated click on the Send/Recv toolbar button is required? > > Thanks in advance! > Martynas > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 
eliverNow() will work as expected, or whether the
