Link to text file

sumdumgai

Registered User.
Local time
Today, 02:02
Joined
Jul 19, 2007
Messages
453
I need to allow the user to select a .txt file, whose location and name may change, and create a table linked to that file. The .txt file is pipe delimited. I can create a link to the file okay using acLinkDelim, but the only way that I can see to delimit the fields is by first creating a specification. Do I have to modify the specification each time the file name or path changes, or is there a way in VBA to create the linked table with the delimited fields? Hope my question is clear enough. Thanks for any help.
 
If the only thing that is changing is the file name or path your can just create the linked table using the wizard and then when you need to change the file name or path relink it with the Link Table Manager. The J Street Relinker might be useful also. It relinks all linked tables that don't have valid links but if you don't want that you could probably modify the code to relink this specific text file link.
 
Thanks for helping. I think I now have it working. Created the link spec and then reuse it with different .txt files.
 

Users who are viewing this thread

Back
Top Bottom