请吹水佬帮忙看一下
If Type('MYWORD')<>'O'MYWORD = Createobject('WORD.APPLICATION')
Endif
MYWORD=Createobject('WORD.APPLICATION')
filelj=sys(5)+sys(2003)+'\data\rhtbzy.doc'
?filelj
ow=MYWORD.DOCUMENTS.Open(filelj)
myword.ActiveDocument.PrintPreview
myword.ActiveDocument.PrintOut && 打印
myword.Visible=.T.
ow.saved=.T.
ow.Close
myword.Quit
Release myword
DO WHILE isFOpen(filelj)
INKEY(1)
ENDDO
**INKEY(3)
DO WHILE !isFOpen(filelj)
INKEY(1)
?'是否关闭'
ENDDO
RETURN
FUNCTION isFOpen(cFileName)
LOCAL hFile,st
st = REPLICATE(0h00,136)
hFile = Openfile(@cFileName, @st, 0x10)
IF (hFIle != -1)
CloseHandle(hFile)
ENDIF
RETURN hFIle != -1
ENDFUNC
提示找不到Openfile.prg