Private Function IsWordInstalled() As Boolean
On Error GoTo Hell
'Attempt to connect to word
Dim objWord As Object
Set objWord = CreateObject("Word.Document")
'Must have been successful
IsWordInstalled = True
Exit_For:
Set objWord = Nothing
On Error GoTo 0
Exit Function
Hell:
GoTo Exit_For
End Function
No comments:
Post a Comment