>>here is what I do but that keeps asking:
>>
>> SCAN
>> lcFormName = ALLTRIM(cc1.fname)
>> IF NOT EMPTY(lcFormName ) AND FILE(lcFormName )
>> oWord=CREATEOBJECT("Word.Application")
>> oWord.VISIBLE=.F.
>> oWord.DisplayAlerts=.F.
>> oWord.DOcuments.Open(lcFormName )
>> oWord.ActiveDocument.PrintOut(.t.)
>> oWOrd.Quit()
>> oword=""
>> ENDIF
>>
>> ENDSCAN
>>
>>
>
>Here's how I'd rewrite that code:
>
>oWord = CreateObject("Word.Application")
>oWord.DisplayAlerts = .F.
>
>SCAN
> lcFormName = ALLTRIM(cc1.fname)
> IF NOT EMPTY(lcFormName) AND FILE(lcFormName)
> oDoc = oWord.Documents.Open(lcFormName)
> oDoc.PrintOut(.t.)
> oDoc.Close(0) && Close without saving
> ENDIF
>ENDSCAN
>
>oWord.Quit()
>
>Hope this helps.
>
>Tamar
Thanks Tamar (I was missing the close ( I had already moved the create and quit out of the loop.
Peter
Peter Cortiel