Created
December 22, 2015 05:20
-
-
Save Mikuana/c5bd87716eff8f32ccd0 to your computer and use it in GitHub Desktop.
Export all tables in a Microsoft Access database to text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Compare Database | |
Public Sub ExportAll() | |
Dim obj As AccessObject, dbs As Object | |
Set dbs = Application.CurrentData | |
For Each obj In dbs.AllTables | |
If Left(obj.Name, 4) <> "MSys" Then | |
DoCmd.TransferText acExportDelim, , obj.Name, obj.Name & ".csv", True | |
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, obj.Name, obj.Name & ".xls", True | |
End If | |
Next obj | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment