Dim
Info As String
Info = FileSys.ReadAllText(ApplicationPath & "wz.txt", Encoding.Default) '读取生成的文本文件
info = info.Replace(vbcrlf,vblf) '将回车换行替换为换行
Dim pars() As String = Info.Split(vblf) '将读取的信息拆分为数组
Dim r As Row = Tables("表A").AddNew
r("姓名") = pars(0).Trim()
r("性别") = pars(1).Trim()
r("名族") = pars(2).Trim()
r("出生日期") = pars(3).replace("年","-").Replace("月","-").Replace("日","")
r("住址") = pars(4)
r("身份证号码") = pars(5)
r("发证机关") = pars(6)
r("签发日期") = pars(7).SubString(0,10).Replace(".","-")
r("有效日期") = pars(7).SubString(11).Replace(",","-")
FileSys.CopyFile(ApplicationPath & "zp.bmp", ProjectPath & "\Attachments\" & r("身份证号码") & ".bmp",True) '照片复制到Attachments目录
r("照片") = r("身份证号码") & ".bmp"
r("名族") = pars(2).Trim()错误r("民族") = pars(2).Trim()