• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 430
  • Last Modified:

Import Text File into Acess using a macro

I have a macro to import a text file into Access. I am using the Transfer Text Action in the macro section. Under Transfer Type I have chosen the Import Delimineted Type.
The .txt file I am importing must be a | (pipe or pike?) delimeted file. When it imports to a new table, all the columns from the text file remain in Field 1 of my table, all seperated by the | symbol. how can I have my macro specify the | type for the delimeted function.
The obvious solution of changing the text file to a file type such as Excel will not be possible in this case.
0
Lanscaper
Asked:
Lanscaper
  • 2
1 Solution
 
LanscaperAuthor Commented:
Edited text of question
0
 
HelicopterCommented:
Run the import wizard once (file/get external data/import, select a txt filename, any one will do since you don't need to use the results) and set the delimiter to the |(select advanced on page 2 of the wizard) then save that import specification as a given name. Then in your macro select this name as your import spec.
 
 
 
   
 

0
 
LanscaperAuthor Commented:
You are exactly right. I must admit, I found the same answer through trial and error and using the help files. However, I still feel this was a challenging subject. Thank you for your response.
0
 
rdc092298Commented:
I have tried to perform it with a macro and a import specification but it still doesn't work. I'm using Office 97.

0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now