我是用以下代码提取的,如果某行的照片列里有好几个图片,则无法提取
If .DataTable.DataCols.Contains("照片") Then '包含照片列时
If .IsSubtotal = True Then '汇总情况下
MessageBox.Show("在汇总情况下此项不能操作!", "提示")
Else
Dim dlg As New FolderBrowserDialog '目录对话框
If dlg.ShowDialog = DialogResult.Ok Then
Dim i As Integer
For i = i1 To i2
Dim tx As String
tx = projectPath & "attachments\" & .Rows(i)("照片") '照片路径
If FileSys.FileExists(tx) Then '如果找到
Dim ifo As New FileInfo(tx)
Dim fn As String
fn = dlg.SelectedPath & "\" & .Rows(i)("名称") & Ifo.Extension '加扩展名
FileSys.CopyFile(tx, fn, True) '复制文件,重复则覆盖
End If
Next
End If
End If
End If