Hi

I am using this code and it was working fine. Now all of a sudden it gives me an error
"Runtime error -2147221163
Automation Error
Interface not registered

Does anyone know how to get rid of this error.

This is the code. It is exporting data to MS WORD
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTable As Word.Table
Dim oPara1 As Word.Paragraph, oPara2 As Word.Paragraph
Dim oPara3 As Word.Paragraph, oPara4 As Word.Paragraph
Dim oFoot As Word.HeaderFooter
Dim oRng As Word.Range
Dim oShape As Word.InlineShape
Dim Pos As Double

'Start Word and open the document template.
Set oWord = CreateObject("Word.Application") - error line
oWord.Visible = True
Set oDoc = oWord.Documents.Add