In this VB.Net Tutorial/Code Example, I’m going to provide you with a simple class that allows for you to check whether Outlook is installed on the computer and also figure out which version of the Outlook it is.

{code}Imports Microsoft.Win32

Namespace MS.Office
Public Class Outlook
Public Shared Function isInstalled() As Boolean
Dim regClasses As RegistryKey = Registry.ClassesRoot
Dim rtn As Boolean

Dim reg As RegistryKey = regClasses.OpenSubKey(“Outlook.Application”)
If reg Is Nothing Then
rtn = False
rtn = True
End If

Return rtn
End Function

Public Shared Function version() As String
Dim rtn As String = “”
Dim objApp As Object

If isInstalled() Then
objApp = CreateObject(“Outlook.Application”)
rtn = objApp.Version
End If

Return rtn
End Function
End Class
End Namespace{/code}

Is Outlook installed and what version?
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.