ClassFactory cannot supply requested class

S

sonomaenterprises

When running this function (VB6 inside an Outlook Add-in):

Function GetWordVersion() As Integer
Dim oWord
Set oWord = CreateObject("Word.Application")
GetWordVersion = Int(Left(oWord.Application.Version, 3))
Set oWord = Nothing
End Function

I get this message:
Automation error
ClassFactory cannot supply requested class , Error Number: -2147221231
 
Top