devxlogo

IsOfficeAppPresent – Check whether an Office application is present

IsOfficeAppPresent – Check whether an Office application is present

Enum mbOfficeAppConstants    mbWord = 0    mbAccess = 1    mbExcel = 2    mbPowerpoint = 3    mbOutlook = 4End Enum' Check whether the specified Office application is present' Note: require GetRegistryValue'' Example:'    Dim sDescr As String'    sDescr = "Word is installed: " & IsOfficeAppPresent(mbWord) & vbCrLf & '   '      "Access is installed: " & IsOfficeAppPresent(mbAccess) & vbCrLf & '      '   "Excel is installed: " & IsOfficeAppPresent(mbExcel) & vbCrLf & '        ' "Powerpoint is installed: " & IsOfficeAppPresent(mbPowerpoint) & vbCrLf & '   '      "Outlook is installed: " & IsOfficeAppPresent(mbOutlook)'    MsgBox sDescrFunction IsOfficeAppPresent(ByVal mbOfficeApp As mbOfficeAppConstants) As _    Boolean    Dim sApp As String    Const HKEY_CLASSES_ROOT = &H80000000        Select Case mbOfficeApp        Case mbWord            sApp = "Word.DocumentCurVer"        Case mbAccess            sApp = "Access.DatabaseCurVer"        Case mbExcel            sApp = "Excel.SheetCurVer"        Case mbPowerpoint            sApp = "PowerPoint.SlideCurVer"        Case mbOutlook            sApp = "Outlook.EnvelopeCurVer"    End Select    'if it reads a value, the key exists --> the application is installed    IsOfficeAppPresent = (Len(GetRegistryValue(HKEY_CLASSES_ROOT, sApp, _        "")) > 0)End Function

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist