Solved

Outlook integration

Posted on 2004-03-26
2
370 Views
Last Modified: 2008-02-01

I created an application that has a feature that can integrate with MS outlook. Not all the users of this app have outlook and would like to use the integration feature.

I am using vb6, how can i check if the correct version of outlook is installed, and if not skip over the outlook intgration code.

Thanks

0
Comment
Question by:rovi
2 Comments
 
LVL 9

Expert Comment

by:p_sie
ID: 10690374
check if the folder of office exists is a quick and easy way.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 200 total points
ID: 10697038
I can think of two other ways to check.  One, check the registry and see if Outlook is installed.  I don't know what key to look for though.  Two, the following code checks the version of Outlook.  If Outlook isn't installed, then creating the Outlook.Application object will fail and the OnError code can return a value indicating that Outlook isn't installed.  The code is pretty simple and straightforward so it should get the job done.  However, I suppose something other than Outlook not being installed could cause an error in which case the function would say Outlook isn't installed when in fact it is.  You could also modify the function to return a boolean value instead of the version number.

Function CheckOLVersion()
   On Error GoTo Outlook_Not_Installed
   Dim objOutlook As Outlook.Application
   Set objOutlook = New Outlook.Application
   CheckOLVersion = objOutlook.Version
   Set objOutlook = Nothing
   Exit Function
Outlook_Not_Installed:
   CheckOLVersion = "Not Installed"
End Function

If CheckOLVersion() <> "Not Installed" Then
   Execute Outlook Integration Code
End If
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question