Sub SaveToFileAll() Dim strSQL As String, rs As DAO.Recordset strSQL = "Select AttachmentField_Name.FileName As FileName, " & _ "AttachmentField_Name.FileData As FileData " & _ "From table_Name" '"Where FileName = 'FileName'" Set rs = CurrentDb.OpenRecordset(strSQL) Do Until rs.EOF rs.Fields("FileData").SaveToFile CurrentProject.Path & _ "\" & rs.Fields("FileName").Value rs.MoveNext Loop End Sub
0 件のコメント:
コメントを投稿