Solved

Outlook integration

Posted on 2004-03-26
2
378 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month3 days, 19 hours left to enroll

630 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