AfterOpenProject代码:
If FileSys.DirectoryExists("\\\\HRW\\data\\军人事务局\\扫描文件")=False Then \'如果目录C:\\MyFolder不存在
FileSys.CreateDirectory("\\\\HRW\\data\\军人事务局\\扫描文件") \'则建立
End If
With FileWatcher
.Path = "\\\\HRW\\data\\军人事务局\\扫描文件"
.Delay = 1000
.Enabled = True
End With
文件监视器中fileCreated中代码:
Dim Index As Integer = CurrentTable.Current("处理签扫描").split(vbcrlf).length
CurrentTable.Current("处理签扫描") = CurrentTable.Current("处理签扫描") & CurrentTable.Current("收文编号") & "_" & Index & ".jpg" & vbcrlf
FileSys.CopyFile(e.FullPath,"\\\\HRW\\data\\军人事务局\\"& CurrentTable.Current("收发文") & "登记\\"& CurrentTable.Current("收文编号") & "_" & Index & ".jpg",True)
扫描文件按钮中的代码:
Dim Proc As New Process
Proc.File = "C:\\Windows\\System32\\wiaacmgr.exe"
Proc.Start()
Proc.WaitForExit() \'等带拍照程序退出.