Need Help Importing Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am doing some research and need some help importing text on a daily basis.
I would like to find a way to create a macro that will pull information from
a text file I create that will have data I paste everyday from a website into
that text file. I have created the fields in the table that will always be
permanent , just a matter of posting the information in the table fields
which is where I need help. Can anybody help me out. thank you
 
Steveo said:
I am doing some research and need some help importing text on a daily basis.
I would like to find a way to create a macro that will pull information from
a text file I create that will have data I paste everyday from a website into
that text file. I have created the fields in the table that will always be
permanent , just a matter of posting the information in the table fields
which is where I need help.


If the text file is rigorously structured, then you can just
link to it as if it were a table. Then a simple append
query can stuff the data into your real table.

If you text file doesn't look like a table, then I can't
imagine doing it with a macro, but there are many facilities
for doing it in a VBA procedure. Check VBA Help for Open
and Input Line statements fo starters.
 
I am doing some research and need some help importing text on a daily basis.
I would like to find a way to create a macro that will pull information from
a text file I create that will have data I paste everyday from a website into
that text file. I have created the fields in the table that will always be
permanent , just a matter of posting the information in the table fields
which is where I need help. Can anybody help me out. thank you

You'll need some VBA code (or, if you insist, a Macro, though VBA traps errors
and macros don't), using the TransferText method. You should be able to
transfer the data directly from the text file into the table, or if not, link
to the text file and run an Append query into the table. See the VBA help for
TransferText.

John W. Vinson [MVP]
 
Back
Top