|
写了段程序,目的是对比2篇word文档中,字串是否相符的问题,代码如下
arg4="E:\4110language\Help doc\Fr_02.doc"
arg5="E:\4110language\Help doc\Fr_02m.doc"
wait 1
String2=list(arg4,arg5)
wait 1
msgbox String2
Function list(arg4,arg5)
Dim fso,file1,file2
Set fso=createobject("Scripting.FilesystemObject")
Set file1=fso.opentextfile(arg4,1,false)
Set file2=fso.opentextfile(arg5,1,false)
ss=";"
While ( not file1.atendofline) and (not file2.atendofline )
tmp1=file1.ReadLine
tmp2=file2.ReadLine
If StrComp ( tmp1, tmp2 ,0) <> 0 then
ss=ss+tmp2
End If
Wend
file1.Close
file2.Close
list=ss
End Function
结果字串显示乱码
正确的应该是;Dreheyunp |
|