Copy and Paste to Import

  • Thread starter Thread starter LeeTV
  • Start date Start date
L

LeeTV

Hi,
I get registration on the web via email. at the bottom of the email is the
format of text to import.
ie.
Visitor Ip: 71.188.95.49
*** Text Database Entry ***
"First Name","Last Name","Street Address","City","State","Zip","Email
","Phone-Home","Phone-Cell","Phone-Fax","Course Name","Course Type","Course
Date & Time"
"Tom","Roon","1 Any Road","Any
Town","NJ","00000","(e-mail address removed)","9999999","609 915
2201","","ACLS","Renewal","September 7th 2008 @ 10am (Hillsborough--FULL
COURSE)"

what i want to do it copy this information from the email, and paste it into
a "text" box in access. then i want access to 'import' the information, but i
have no clue how to go about it.

tia.
Lee
 
dumping the text data into a table field, or an unbound form control, and
then parsing it, sounds like a pita. but then i'm not at all good at parsing
raw text data. if you're in the same boat, you might try the same experiment
i did, instead:

i took the data you posted, and pasted it into a new text document. then i
imported the .txt file into Access, using the Import wizard, and choosing
Delimited as the format, Comma as the delimiter, and " as the Text
Qualifier. actually, the wizard analyzed the data and made those default
choices, i just didn't have to change anything. and i did checkmark the
"First Row Contains Field Names" checkbox. the data imported into a new
table in my Access db, with any flaws.

when you first import text data, you can save the wizard settings as an
Import Specification (see the Advanced button in the lower left corner of
the wizard dialog box). subsequent imports can then be automated.

hth
 
Thanks Tina,
Worked Great.
although a little cumbersome with the muiltiple files approach, but it does
work fine.
i'm wondering if there is a way to copy and paste to a unbound text box then
have the contents saved as a txt file, then using code do the rest as you
described.

anyone know how to save the contents of a txt box to a .txt file?

Thanks again.
lee
 
yes, it's cumbersome, but "better than nothing" - which is what i sometimes
have to settle for when i'm trying to come up with a way to do something i
don't have the skills to do "right".

i can't think of a way to output data from an unbound textbox control, i
think it would have to be bound to a table field, and the text actually
saved into the table...and then various issues would arise such as bloating;
the 255 character/spaces field size limit on Text data type; alternately,
would Memo data type output without issue, etc, etc.

but you might try opening the text file before starting your "it's time to
process all these emails" session; then in each email in turn, copy/paste
into the open text file and save the file without closing. keep the database
open as well; you should be able to just click a button to run the automated
"import from the text file" setup. then move on to the next email, back to
the text file, and back to the db, in a rotation. the only issue with that
scenario is that Access may not be able to import an open .txt file - even
if it's been saved. i don't know, i've never tried to do it.

okay, i just did a test in MS Outlook. i was able to open an email message
and do a Save As to a .txt file. of course, that included everything - the
From, Sent, To, Subject lines, as well as the body of the email. but,
depending on how rigidly the emails are formatted (for instance, do you get
just the header info and then the desired text strings in the body - or do
you get variable messages in the body, above the desired text), you might be
able to set up the automated import process to weed out all lines except the
lines you're targeting.

hth
 
Thanks a ton for your reply. Most certainly I can get started... obviously
the best idea would be to have a website that just automates registration for
each of the courses... but that's a long way off.
thanks again.
Lee
:)
 
Back
Top