Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Retrieve Vcard using Visual basic

Status
Not open for further replies.
Jun 27, 2004
8
US
How to retrieve Vcard using visual basic? Anyone knows? Please help me.....
 
Are you trying to display an existing vCard file or convert some data that you have to vCard format?

If you can't find a COM object to do it for you then just snag a copy of the RFC and do it the hard way.

 
Thanks for your reply. I want to retrieve the content
of the vcard file because my boss asked me to tranfer it
to our database.

Do you have any idea?

Thanks
 
If this is a one time thing and it only involves a very few number of vCard files, then I would just open it up in Notepad and do it by hand.

On the other hand if he exported his entire Outlook or ACT contact list then I would spend about 10 minutes looking on Google for a free ActiveX/COM object to do the conversion and if that didn't work I'd just write a little program to parse the file.

The file format is quite simple, the most difficult thing is that can contain MIME encoded binary data but this will only happen if someone embeds an image, video, etc into the vCard. If you are going to put it into a database you can probably ignore those fields anyway.

So if there were more vCards than I wanted to do "by hand" the I would write a little parsing program and either use the native VB file functions like (Open, Close, Get, Put, Write, Print, etc..) or maybe I would just use the Scripting.FileSystemObject instead.

As long as it doesn't have any MIME then you can probably figure out all of the data just by looking at it. Or you could go into Outlook and make a new contact for yourself and then fill in all the textboxes with the name of the field... so like First Name = First Name, Zip = Zip, etc... Then just EXPORT your new fake contact to a .VCF file and open it with NotePad.exe (or UltraEdit or whatever) and take a look. If you still had fields you couldn't figure out by looking at them well you can always dig up a vCard RFC with Google.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top