[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

text file I/O in VB

I need VB to open a text file containing thousands of (approx 1,600) email messages and read the email addresses and names and write them to an access db table, what are the best functions to use in this situation....how best approach this problem?
0
Seaghan
Asked:
Seaghan
1 Solution
 
VbmasterCommented:
It depends on how the data is stored in the file. The easiest solution would probably be to open the file and read line by line using the Line Input statement.. something like this..

Dim Filenr as Integer
Dim sValue as String

Filenr = FreeFile
Open filename For Input As #Filenr
Do Until EOF(Filenr)
  Line Input #Filenr, sValue
Loop
Close #Filenr
0
 
eab111098Commented:
How is this text file structured. In other words, how do you decipher between an email address and alias names?

Ed.
0
 
kplonkCommented:
you could look for a "www" string in the file, that would be a good place to start. then reed to the next chr(32) or space that you give you the email address
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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