Click here to Skip to main content
Sign Up to vote bad
good
See more: VB.NET
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:
 
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 30-May-12 23:10pm
OdeJong446


2 solutions

The String[^] class contains all the methods you need to split information out of text such as the above.
  Permalink  
Solution 1[^] provides you with enough to process the data, but you can open and read a file using
 
FileOpen(1, FileName, Input)
Do Until EOF(1)
  Data = LineInput(1)
Loop
FileClose(1)
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Christian Graus 373
1 OriginalGriff 326
2 Prasad_Kulkarni 314
3 Ron Beyer 286
4 Prasad Khandekar 225
0 Sergey Alexandrovich Kryukov 7,061
1 Prasad_Kulkarni 3,830
2 OriginalGriff 3,620
3 _Amy 3,370
4 CPallini 3,074


Advertise | Privacy | Mobile
Web01 | 2.6.130619.1 | Last Updated 31 May 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid