Export all contacts as vcards from Outlook

So, I want to export all my contacts from Outlook as vcards. If I talk about it with Google, I get a bunch of shareware, but I want something free to work.

If I myself will encode it, I must use the Microsoft.Office.Interop.Outlook assembly. Has anyone already had code to convert ContactItems to vcards?

Edit: I decided this in a completely different way, see the answer below, but I accepted dok1.myopenid.com's answer as accepted because it answers my original question.

+4
source share
4 answers

I did not solve this in a programmatic way:

  • All contacts selected in Outlook
  • Forwarded them as cards to myself
  • All attachments (vcards) in the folder are saved, c:\temp
  • I opened the command line and typed the command copy /a *.vcf c:\allcards.vcf , which combines all vcards into one
+9
source

Why is it worth it? I just stumbled upon this topic, looking for the same export to separate .VCF files from Outlook. I am haev 2007 (I don’t know if that matters), but I selected all the contacts and dragged them into a new email message, which will be added as separate .VCF files. After all of them were added, I clicked in the attachment section of the new message, pressing CTRL-A to select all of them, and then left-clicked (and therefore all of them) the folder I needed. VCF files. For several minutes, Outlook "thought" about my 400 contacts, they were all there!

+4
source
They sure are hard to find, right? See if that helps. http://msdn.microsoft.com/en-us/library/aa579624(EXCHG.80).aspx

This includes: In the following example, the CDO Person object is used to retrieve the vCard information for the contact.

 Dim oPerson As New CDO.Person Dim strm As New ADODB.Stream ' Assume strURL is a valid URL to a person contact item oPerson.DataSource.Open strURL ' You can set the ADO Stream object to the returned vCard stream Set strm = oPerson.GetvCardStream ' Save the stream to a file. ' Note: using adSaveCreateOverwrite may cause an existing ' contact to be overwritten. strm.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite ' You don't have to set a Stream object, ' just use the Stream methods off GetvCardStream directly oPerson.GetvCardStream.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite 

Yes, the only code sample is in VB.

+3
source

I just bought an X8 and was really going to get angry when I couldn't easily transfer my contacts ... until I started monitoring the phone.

First export all your contacts to Outlook in vCards (I found that sending them by e-mail is the easiest. If you get an "for many attachments ..." error message, you can save them from e-mail in the folder of sent items) and copy vCard to the memory card on your phone.

Secondly, open your address book on the phone, then press the left button on the phone (button with 4 small squares above it. NOT 4 BOXES ON THE SCREEN ... PHYSICAL BUTTON!).

Thirdly, select “Import / Export” and select import from the memory card. Import all vCard files and you must be gold.

Good luck ... don’t ask me any questions, because I won’t come back to look at any messages ... just passing by, trying to figure it out on my own.

+1
source

All Articles