79292829

Date: 2024-12-19 00:22:07
Score: 2
Natty:
Report link

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

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user28814433