Click here to Skip to main content
15,896,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey

of all the questions i have asked i don't understand the answers.
Because i'm from holland, my english is not very good en I don't understand examples from websites like MSDN etc.. so my question now is:

I have a textfile: *.vcf and i want to read this file Line by Line.
Then i want to split ":" because after the ":"..is the info i need to show.

example of the file is:

CSS
BEGIN:VCard
VERSION:2.1
N:'T GROENE HART
FN:
TEL;WORK;VOICE:0505420369
TEL;WORK;VOICE:0505420369
TEL;HOME;VOICE:06-12345678
TEL;CELL;VOICE:06-12345678
TEL;VOICE:0512 342040
TEL;WORK;FAX:0512 342040
TEL;FAX:0512 342040
ADR;WORK;PREF:;;Straat 34;HoutJE;;8765 AF
ENCODING=QUOTED-PRINTABLE:Straat 34
URL;HOME:www.biss.nu
URL;WORK:www.biss.nu
EMAIL;PREF;INTERNET:Jan@home.nl
END:VCARD


I don't need the BEGIN:VCARD, VERSION and the END:VCARD..so if it startswith VCARD then I want to read nextline tille N: and from this line convert the txt file to frmVCard.txtVCard "Text"..

can anyone give me an code example.. please no website..

thanks
Posted

The String[^] class contains all the methods you need to split information out of text such as the above.
 
Share this answer
 
Solution 1[^] provides you with enough to process the data, but you can open and read a file using

VB
FileOpen(1, FileName, Input)
Do Until EOF(1)
  Data = LineInput(1)
Loop
FileClose(1)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900