Resolved with calling vba in python python: def run_macro(macro_name): try: access_app = win32com.client.Dispatch(‘Access.Application’) access_app.Visible = False access_app.OpenCurrentDatabase(access_db_path) access_app.DoCmd.RunMacro(macro_name) access_app.Quit() run_macro(“Macro”) VBA: Sub ImportTextFileWithSpec() filePath = “file.txt” importSpec = “SpecName” tableName = “Test” DoCmd.TransferText _ TransferType:=acImportDelim, _ SpecificationName:=importSpec, _ TableName:=tableName, _ FileName:=filePath, _ HasFieldNames:=True End Sub