Hi All,
I am new to Access Macros and to this forum.
I want to export all the tables of Ms Access as txt file with fieldseparator ="|", textqualifies= none and with No Headings.
I have created a Export Specification and as the heading of all the tables were different created query SELECT * FROM MSysIMEXColumns and deleted all the data from it. Because of which my Export Specification is working perfect but i am still getting the Headings in my text files.
My Code:
Public Sub Macro1()
Dim td As DAO.TableDef, db As DAO.Database
Dim out_file As String
out_file = CurrentProject.Path & "\"
Set db = CurrentDb()
MsgBox "Txt file be saved at Database Path", vbOKOnly, ""
For Each td In db.TableDefs
If Left(td.Name, 4) <> "MSys" Then
DoCmd.TransferText acExportDelim, "Sanchi2", td.Name, out_file & Replace(td.Name, "TblOut_", "") & "_Actual" & ".txt", False, ""
End If
Next
End Sub
Looking forward to all your inputs to help me with this. Thanks in advance