Skip to main content

Import vCard to Outlook bulkly then export those contacts into excel then .csv then import them into Gmail then to whatever mobile phone you have.

This can also be done using a VBA macro. First create a folder on the root of the C: drive and name it VCARDS. Next copy all your individual vCard files (.vcf) to this newly created folder. Next open Outlook and click ALT + F11 to open the VBA editor.

Click TOOLS --> REFERENCES and then select Microsoft Scripting Runtime and Windows Script Host Object Model from the list and place checks in the box next to each and click OK.

Next click INSERT --> MODULE and copy and paste the code below into the blank module. Save and run the macro to automatically import and save all the individual files into Outlook.


Sub OpenSaveVCard()
   
Dim objWSHShell As IWshRuntimeLibrary.IWshShell
Dim objOL As Outlook.Application
Dim colInsp As Outlook.Inspectors
Dim strVCName As String
Dim fso As Scripting.FileSystemObject
Dim fsDir As Scripting.Folder
Dim fsFile As Scripting.File
Dim vCounter As Integer
   
   
Set fso = New Scripting.FileSystemObject
Set fsDir = fso.GetFolder("C:\VCARDS")

For Each fsFile In fsDir.Files

    strVCName = "C:\VCARDS\" & fsFile.Name
    Set objOL = CreateObject("Outlook.Application")
    Set colInsp = objOL.Inspectors
        If colInsp.Count = 0 Then
        Set objWSHShell = CreateObject("WScript.Shell")
        objWSHShell.Run Chr(34) & strVCName & Chr(34)
        Set colInsp = objOL.Inspectors
    If Err = 0 Then
            Do Until colInsp.Count = 1
                DoEvents
            Loop
            colInsp.Item(1).CurrentItem.Save
            colInsp.Item(1).Close olDiscard
            Set colInsp = Nothing
            Set objOL = Nothing
            Set objWSHShell = Nothing
        End If
    End If

Next

End Sub

Thanks for Rollin_Again who posted this source code on the net

Comments

Popular posts from this blog

home routine dairy

handyman workshop fixed bosch dishwasher hinge cover took off the rusted laundry tap

How to remove Hyundai I30 radio

My car is Hyundai I30 (2011) I lost my radio security code then my radio didn't work since then. following instruction are how to remove central control panel, take off the radio and get radio S/N then calculate the radio security code: 1. open up the top glove box and remove the matt at the bottom.  You can see 4 screws, remove these 4 screws 2. pull the glove box toward yourself, to take off the box from central control panel. 3. then you can see another screw just below the yellow mark, unscrew it     You don't need to unscrew the 2 screw in the front.  4. pull the whole central panel toward yourself evenly, then you can get off the cental panel.   5. read the last 4 digis from the S/N: 0087 (see above photo)     plus 1212 equals 1299     then you get your radio security code: 1299 -- Photos shared with Fish Bowl Photo. http://www.pixiereef.com