https://sourceforge.net/projects/bulkvcftocsv/
by Greg Hadlock
Email: ghadlock@gmail.com
NOTE: If you use this program and it works for you, please take a moment and provide a review at
https://sourceforge.net/projects/bulkvcftocsv/reviews/new. If this program does not work correctly,
please feel free to post a message in the discussion section (https://sourceforge.net/p/bulkvcftocsv/discussion/?source=navbar)
or email the .vcf file to me at ghadlock@gmail.com and I will troubleshoot and either update the code
or tweak the .vcf file (if it does not meet standard formats).
Update History:
v4.003 Released 5/7/2021
- Support for Encoded Name field beginning with "N;", program potentially crashed or lost data upon encountering these entries.
v4.002 Released 3/30/2021
- Renaming of columns in output CSV file, changing "Email" to "E-mail" for improved import compatibility with Microsoft Office 365 - Outlook Web Access. EXPERIMENTAL at this point, may impact import compatibility with other platforms.
- Improved parsing / handling of Windows-1252 character set
v4.001 Released 3/22/2021
- Recognition and handling of additional X-ABLABEL: fields generated by Android devices
v4.000 Released 3/09/2021
- NEW error handling routine that gracefully exits macro on error instead of causing a crash, also records value of cell that caused crash in a -DEBUG.txt file for quick troubleshooting
- Further development of new and/or malformatted entries from Android devices
v3.094 Released 02/16/2021
- Support for new "ItemX." entries as created by Google / Android devices, previous versions did not process this data.
- Introduction of debug file; any unknown or unprocessed entries will be written to a file ending in -DEBUG.txt in the same directory as the VCF file. This DEBUG file can be submitted to share errors with the developer without transmitting entire VCF files which can be quite large.
V3.091 Released 09/20/2020
- Significantly improved support for international characters and saving of CSV file in UTF-8 format.
- Support for Lotus Notes exports; removes unnecessary data inserted by Lotus Notes
- Support for Android Events; events are added into the notes field of the applicable contacts
- Includes instruction page for dealing with multiple contacts or international characters
v3.087 Devel Released 09/10/2019
- Accumulation of tweaks based on non-standard VCF files, supports all non-standard VCF file issues that have been submitted.
v3.085 Released 05/30/2018
- Many minor tweaks to accomodate non-standard VCF files as submitted by users; approximately 40 different non-standard VCF files have been accomodated by updated code so this program should be compatible with ~98% of VCF files out there (and more than any of the pay-to-use programs)
v3.07 Released 07/23/2015
- Support for nuances of "My Contact Backup" VCF exports, specifically handling some lines terminated with only Carriage Return, and removing extraneous "CHARSET=UTF-8" statements that are not related to ENCODED=QUOTED-PRINTABLE entries (and therefore unnecessary)
- Added dialogue at conclusion of the script asking user if they wish to delete empty columns (i.e. fields in the CSV for which no entries were imported). Users should generally select "YES" for a clean output, unless they desire to merge multiple output CSV files together in which case keeping all columns (selecting "NO") results in identical column layouts on each of the CSV files so simple copy and paste commands can be used for merging.
- Handling of "X-SOCIALPROFILE" entries containing a space in the VCF field identifier
v3.05 Released 6/30/2015
- Improved support for Mac Office 2011, including notifying users when filename and path are too long
- Graceful exit when attempting to run on Mac office 2016 (not yet supported, pending further Microsoft development of Office 2016)
- Error handling when user attempts to open a non .VCF file or the .VCF file is empty
v3.04 Released 6/26/2015
- Support for Assistant, Spouse, and Children fields in CSV output
- Support for Preferred Email, Preferred Phone, and Preferred Address fields
- File & path length limit of 97 characters enforced on Mac to prevent crash (if you receive error message, you must shorten path / file name to input VCF file)
- Output .CSV file now saves in location of input .VCF file, with same name of VCF file. Multiple runs of the macro will result in CSV files with suffix of -1, -2, -3, etc and not overwrite previous versions of CSV file
- Cleaned output of Home Address and Business Address fields, replacing \n characters with line feeds
- Excel no longer prompts you to "save changes" when closing .csv file or .xlsm file that contains macro
v3.03 Released 6/08/2015
- Added support for Macintosh (Apple) computers running Excel 2011. Much thanks to Andy Scott for his input, suggestions, and endless help in testing!
V3.02 Released 5/26/2015
- Complete rewrite of VCF field decoding; approximately 20% reduction in lines of code and execution time to provide faster operation, greatly improved scalability and maintainability
- Support for VCF Files using ITEMX formatting supporting more than 9 items per contact
- support for additional non-standard field types as found in COBook
v2.93 Released 5/11/2015
- Removal of all blank columns (unused VCF fields) in final CSV output for simplied import mapping
v2.92 Released 5/1/2015
- Detection of blank lines caused by sequential carriage returns
- Detect and ignore blank line on first line of file (before first VCF file), previously caused crash
v2.91 Released 4/18/2015
- Added support for COBook VCF Exports
- Fixed bug introduced in v2.8 in which some exported fields had a colon in front of the field value
- Further cleanup of exported data, removing trailing commas and semicolons as found in exported fields
v2.9 Released 4/8/2015
-Trim / removal of all leading and trailing white spaces in exported CSV file; results in VCF fields that contain only spaces being blank / null for cleaner export
-Improved code for pop-up message box asking to merge contacts, previously this messagebox could potentially pop up behind other windows.
v2.8 Released 4/2/2015
- Added support for files exported by "Export Contacts", a downloadable Android APK application. This particular application uses non-standard delimiters of type fields (commas instead of semicolons) in phone numbers, and also lists the types in incorrect order. Example: Export Contacts creates a string "TEL;TYPE=VOICE,CELL,PREF:+xxxxxxxxxxx" which if correctly formatted would be "TEL;TYPE=CELL;VOICE;PREF:xxx-xxx-xxxx" (see http://en.wikipedia.org/wiki/VCard). This tool now corrects the delimiters (changes commas to semicolons) in the string, and can process out of order type fields.
v2.7 Released 3/23/2015
- Remove ASCII control characters of SOH (Start of Header) and CAN (Cancel), ASCII 1 and ASCII 24 if found in ENCODING=QUOTED-PRINTABLE entries; these characters prevent Outlook from opening the CSV file for import
Version 2.6 Released 2/20/2015
- Support for non-latin character sets
- Significant change in decoding of ENCODING=QUOTED-PRINTABLE entries, defaulting to UTF-8 instead of Windows-1250 to improve international character set support
Version 2.5 Released 2/6/2015
- Addition of code provided by M. Kern to support UTF-8 formatting with locale other than English (US)
- Improved support for locales other than English
Version 2.4 Released 1/28/2015
- Support for Charset types with colon ":" delimiters
- Handling of Microsoft custom fields such as X-MS-OL-DEFAULT-POSTAL-ADDRESS, X-MS-CARDPICTURE
- Handling of X-SOCIALPROFILE, X-AIM and IMPP (instant messenger) fields
Version 2.3, Released 12/19/2014
- Capability to delete duplicate contacts that contain email address only (generally created by Gmail) when same email address is found in another contact with more information
Version 2.2, Released 12/17/2014
- Support added for Samsung device (phone and tablet) exports with non-standard fields
- MIME (Encoding Printable) support improved
- Support for fields > 255 characters in length (e.g. long notes fields)
Version 2.1, Released 12/6/2014
- Support added for VCF 2.1 standard
- Support added for files with ENCODING=QUOTED-PRINTABLE
- Overall increased compatibility with various .VCF file formats
- Bug fix to correctly import addresses and URLs from files exported from Google Contacts
Version 2.0, Released 9/9/2014
- Published as Excel .XLSM file to simplify usage. Simply download and open the Excel file, Enabling Macros if prompted, and then select the .VCF file that you wish to import
Modified file import structure to support VCF files with Carriage Return and Line Feed delimiters at end of each line, greatly improves VCF file compatibility
- Adding support for Google handling of "items", tested with Google contact exports of over 5,000 contacts
- Added field support for Manager Name, Nickname, Office Location
- Added error handling for scenario when user cancels file open; not exits gracefully
- Add messagebox upon job completion providing number of contacts imported and ability to open Sourceforge page for product review
Version 1.1, Released 7/25/2014
- Contains bug fix allowing operation in a spreadsheet that has not previously been saved
Requirements:
- Written in Excel 2013, VBA code should also work in Excel 2010. Has not been tested in Excel 2007 or previous versions, but it may work and would like feedback from users with versions of Excel other that Excel 2013
Script Overview:
This script is based upon Visual Basic for Applications (VBA) and runs within Excel. The script is written to import .VCF files containing multiple vcards and convert them to a .CSV file with column headers that match the Outlook import template. The intent of this macro is to allow users to import bulk Vcard (.vcf) files into Outlook contacts.
Installation instructions:
This is a Visual Basic for Applications file that must be imported into Excel VBA. To install:
1) Save the file to your computer in a location where you can find it
2) Start Excel and open a new workbook
3) Enable the Developer Tab on the Ribbon if not already enabled. Instructions on how to do this are available on the Microsoft website here:
Office 2010 / 2013: http://msdn.microsoft.com/en-us/library/bb608625.aspx
Office 2007: http://msdn.microsoft.com/library/bb608625%28v=vs.90%29.aspx
4) Start Visual Basic by clicking on the Developer Tab and then the Visual Basic button
5) Once in Visual Basic, import the file by clicking on the "File" Menu, selecting "Import File..." and then browsing to locate "VCFImport.bas". Once located, select it and click "Open"
6) Once opened, click on the "File" Menu again and select "Close and Return to Microsoft Excel"
7) Once back in Excel, click on the "Developer" tab again, then click on Macros, select "OpenVCFFile" and click "Run"
8) Once the macro starts, it will ask you to browse and open the .vcf file you wish to import
9) once you've selected the VCF file, simply WAIT! There is not a progress indicator though the script is working. The length of time that it takes depends on the size of the vcard file (i.e. number of contacts) and the speed of your computer. In testing, I used a vcf file with 20,483 contacts on an "average" laptop, and it took about 3 minutes. When the macro is complete, Excel will display the created .CSV File which you can then save and use for importing contacts into Outlook.
Important- if you use this tool, please post a review or feedback, or drop an email to me at ghadlock@gmail.com. I've also written the code to be easily modifyable to support new / additional VCF card fields, so if a specific VFC card field isn't being imported, please post to the SourceForce discussion here: https://sourceforge.net/p/bulkvcftocsv/discussion/ and I'll update the code accordingly. Also, if this does not work with your VCF File, please email the vcf file to me at ghadlock@gmail.com and I'll take a look and respond within a day or two.
If you've made it this far, thanks for reading!!
Greg Hadlock