Import VCF files to an Outlook folder


M

MA

I need to import VCF files to an Outlook folder.

One option is to create the Outlook contact item and set all the
properties based on the VCF item which require parsing the VCF file,
etc.

Just wondering is there any easy way to import the VCF file to
Outlook.

BTW, I am using the Redemption library. I have used the Redemption
RDOMail.Import() to import external file to the message. It was great
the Import method takes care everything, hoping any other simple way
to import VCF files :).

Thanks in advance for your advice.

Regards,
MA
 
E

Eric Legault [MVP - Outlook]

You can import them indirectly. What you basically need to do is automate
opening the .vcf files and then grab the Contact object from the opened
Inspector object via ActiveInspector.CurrentItem. To open the files, loop
through the .vcf files in the folder using the FileSystemObject from the
Microsoft Scripting Runtime Library to get the file names. Then use the
following Win32 API declarations to facilitate the call to opening the files:

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Public Const conSwNormal = 1

You'll have to paste that into a standard Module, not the ThisOutlookSession
module. Then you can open the file with this call:

ShellExecute 0, "open", "D:\Users\Eric.GOOMBAHNET\Desktop\Eric Legault.vcf",
vbNullString, "", conSwNormal
 
Ad

Advertisements

M

MA

Thanks Eric for your suggestions.

I guess your approach will open the VCF file in a window and then
save. I need to import many VCF files (could be thousands) to Outlook
which is part of the conversion utilities. I will prefer not to keep
opening window and close it.

Is it possible to automate the process of importing VCF files without
opening another window?

Thanks,
MA
 
E

Eric Legault [MVP - Outlook]

Another way is to parse the contents of each .vcf file and manually create
the Contacts from scratch in code. Of course, you'd require a firm knowledge
of the vCard specification in order to parse the name-value pairs in the file.

vCard - Wikipedia, the free encyclopedia:
http://en.wikipedia.org/wiki/VCard

vCard 2.1 specification:
http://www.imc.org/pdi/vcard-21.txt

If you want to buy a solution to do this for you, there are several out
there - search for "import vcard Outlook" and you'll see several.
 
Ad

Advertisements

Joined
Apr 10, 2019
Messages
1
Reaction score
0
vCard Export Import software is found to be highly in demand by the users to import VCF to Outlook and to export VCF from outlook in an easy and trouble-free manner. Use Softaken vCard Export Import Tool is helpful to those users who want to view their contacts to Outlook or want to extract contacts from Outlook to their mobile devices. In both the cases, the single tool works seamlessly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top