程序代码:
USE 干部信息汇总表
USE jsxx IN 0
owdapp=crea("word.application")
FOR i=1 TO ADIR(awddoc,'*.doc')
owddoc=owdapp.Documents.Open(SYS(5)+CURDIR()+awddoc(i,1))
SELECT 干部信息汇总表
aPPEND blank
SELECT jsxx
SCAN
nrow=VAL(GETWORDNUM(jsxx.位置,1,','))
ncol=VAL(GETWORDNUM(jsxx.位置,2,','))
ctext=[]
cfld=jsxx.字段内容
WITH owddoc.Tables(1).Cell(nrow,ncol).Range
FOR j=1 TO .Paragraphs.Count
ctext=m.ctext+.Paragraphs(j).range.text+CHR(13)+CHR(10)
ENDFOR
endwith
replace &cfld WITH IIF(jsxx.类型='D',CTOD(ctext),ctext) IN 干部信息汇总表
ENDSCAN
owddoc.close
endfor
RELEASE owdapp
从word读内容太复杂,各种格式转换,从来没这么用过,现学现卖,给你起个草稿参考吧