ole 上的WORD模板應用出現亂碼
string ls_ref
string ls_st_officer_e, ls_st_officer_c
string ls_rank_e, ls_rank_c
string ls_ui_officer_e, ls_ui_officer_c
string ls_date_e,ls_date_c
string is_doc_name
string is_title
is_doc_name="D:\JingCha Pbl\template_doar18.doc"
dw_ref.settransobject(sqlca)
dw_ref.insertrow(0)
dw_ref.setfocus()
ls_ref=trim(dw_ref.getitemstring(dw_ref.getrow(),'as_ref'))
if isnull(ls_ref) or ls_ref='' then
messagebox('DOA - Error','missing Dr Ref!')
return
end if
ls_rank_c="警員"
ole_1.clear()
ole_1.insertfile(is_doc_name)
ole_1.DisplayType = DisplayAsActivexdocument!
ole_1.activate(inplace!)
ole_1.object.Application.selection.goto(true,0,0,'f_rank_c')
ole_1.object.Application.selection.typetext(ls_rank_c)
....
執行后在警員后多顯示了亂碼,有的機子上連"警員"都顯示不出我試過將模板上的字體與pb上的字體設成一致仍不起作用,我的system is 繁體漢字.word是ENGLISG OFFICE 2000,HELP ME,THANKS A LOT