I've had the same error on one of my development machines (XP Pro) all along. I don't know what causes it, and haven't been able to find out. I didn't suspect Norton AnitVirus, although the machine in question had NAV 2004 on it at first and now has NAV 2005.
One work-around is to launch Word manually, then use GetObject() instead of CreateObject() in your VFP app. This is annoying at best on a development machine, and may not even be feasible in the client's environment, but it might serve as an interim solution until a real solution can be found.
The code would be something like this:
TRY
oWord=createobject("Word.Application")
CATCH
TRY
oWord=getobject(, "Word.Application")
CATCH
ENDTRY
ENDTRY
If you find a real cause and solution I hope you'll post it here.
>We have two machines in our office and several at customer sites that have started giving "OLE Error code 0X80040111 ClassFactory cannot supply requested class" after Norton AntiVirus 2005 was installed. Affected machines return the same error running this line from the FoxPro command window:
>
>oWord=createobject("Word.Application")
>
>I Initially thought it might be related to Norton's ScrBlock.dll being set as the InProcServer32 for the CLSID, but that's the case on my machine too, and my machine works fine. I don't have Norton 2005.
Rick Borup, MCSD
recursion (rE-kur'-shun) n.
see recursion.