<b>oWord</b>=CREATEOBJECT('word.document') <b>oDocument = oWord</b>.documents.OPEN('c:\qcf19.doc') <b>oWord</b>.VISIBLE=.T. oRange = <b>o</b>Document.selection.range()The bolding indicates changed items. Mostly, I've renamed the object variables to clarify what object is reference, though I did add an oDocument object so you can track the document separately.
ox=CREATEOBJECT('word.document') >ox.APPLICATION.documents.OPEN('c:\qcf19.doc') >ox.APPLICATION.VISIBLE=.T. > >oRange=Document.selection.range() &&IT CHOKES HERE > >#DEFINE wdLine 5 > >with oRange >.MoveDown(wdLine,1) >.TypeParagraph >.TypeParagraph >.MoveUp(wdLine,2) >.InsertDateTime("MMMM d, yyyy",.f.) >.TypeParagraph >.Typeparagraph >.TypeText (&l_address) >endwith>