string ls_fielddata='hzxm',ls_datacurrent,ls_fieldtext='李四',ls_textCurrent
int li_field_last,li_field_find
li_field_last = 0
li_field_find = ole_text.Object.FieldNext(li_field_last, 0)
Do While li_field_find <> 0
ole_text.Object.FieldCurrent = li_field_find
ls_textCurrent=ole_text.Object.FieldText
ls_datacurrent=string(ole_text.Object.FieldData[li_field_find])
If ls_fielddata = ls_datacurrent AND ls_textCurrent<>ls_fieldtext Then
ole_text.Object.FieldText=ls_fieldtext
Else
li_field_last = li_field_find
End If
li_field_find = ole_text.Object.FieldNext(li_field_last, 0)
Loop
// 我在PB下这样写的,为什么只替换了页眉,没有替换正文 |