If you want to know whether or not a particular Office component is available before attempting automation...

VB Code:
  1. Private Enum OfficeComponents
  2.     Word = 0
  3.     Excel = 1
  4.     PowerPoint = 2
  5.     Access = 3
  6. End Enum
  7.  
  8. Private Function IsOfficeComponentInstalled(Component As OfficeComponents) As Boolean
  9. Dim s As String
  10. Dim o As Object
  11.  
  12.     Select Case Component
  13.         Case Word:       s = "Word"
  14.         Case Excel:      s = "Excel"
  15.         Case PowerPoint: s = "PowerPoint"
  16.         Case Access:     s = "Access"
  17.     End Select
  18.    
  19. On Error Resume Next
  20.     Set o = CreateObject(s & ".Application")
  21.     IsOfficeComponentInstalled = Not (o Is Nothing)
  22.    
  23.     Set o = Nothing
  24.    
  25. End Function
  26.  
  27. Private Sub Command1_Click()
  28.  
  29.     MsgBox IsOfficeComponentInstalled(Word)
  30.     MsgBox IsOfficeComponentInstalled(Excel)
  31.     MsgBox IsOfficeComponentInstalled(PowerPoint)
  32.     MsgBox IsOfficeComponentInstalled(Access)
  33.  
  34. End Sub