Here is the lastest:
Reinstalled Office 97 and re-applied SM1. Applied SP4 to my NT 4.0 OS.
Tried the 5 lines of code you specified:
oWord = createobject( "word.application" )
oWord.Visible = .t.
oDoc = oWord.Documents.Add()
oDoc.PageSetup.LineNumbering.Active = .f.
oWord.Selection.InsertAfter( "Test" )
Same error occured! I tried the same code in VFP5 and it worked beautifully!
You had previously mentioned that this code ran perfectly in your copy of VFP6.
I understand that MS was coming out with a service pack for Visual Studio 6. Do you know if that SP is out yet? If so, have you applied it?