What am I missing I create a word document and get automation error 430 Class doesn't support OLE Automation. Now the program works on several versions of word, but I am having a problem with a version of Word XP. On the test machine, running Office XP, there are no errors: the object is created, the document is generated and everything is fine. But when distributed the program blows up on certain versions of Office, mostly full versions of XP.
Private gdocWord As Object
Private gappWord As Object
'In a sub
Set gappWord = CreateObject("Word.Application")
Set gdocWord = gappWord.Documents.Add
'Later in another sub
gdocWord.Application.Visible = True
'These subs are located in the same module as the declarations. Whats wrong with this code? Why would I get error only on XP machines? Is there a more reliablel way to code this object??????