Solved

Outlook integration

Posted on 2004-03-26
2
367 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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now