1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Import multiple .vCard files in Outlook

Discussion in 'Business Applications' started by matt.ledger, Jan 5, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. matt.ledger

    matt.ledger Thread Starter

    Joined:
    Nov 19, 2006
    Messages:
    37
    My uncle has about 100 .vCard files (each one a seperate contact) which he exported from outlook ... he now has a new computer and wants to import the contacts into outlook. I have tried importing them but am unable to select more than one at a time, I also tried dragging them into outlook but it just opened each one and again I had to saveeach one seperatly.
    If anyone can help it would be great! My uncle is leaving tomorrow so not long!
    Cheers, Matt
     
  2. Anne Troy

    Anne Troy

    Joined:
    Feb 14, 1999
    Messages:
    11,731
  3. dw7017

    dw7017

    Joined:
    Jan 8, 2007
    Messages:
    1
    With WinXP has a program in Accessories called Address Book.
    If you open this then you can drag and drop a multiple entry vcard file, or multiple vcard files from explorer into it.
    Then you can export to another format. To get the address book into Outlook 2003 contacts, I ended up export to a Comma Seperated Text file (.csv) and then importing this into Outlook.
     
  4. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,732
    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.

    Code:
    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 strVCName
            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
    Regards,
    Rollin
     
  5. tarts

    tarts

    Joined:
    Jan 9, 2007
    Messages:
    2
    What to do if Outlook 2000 gives error
    "Run-time error '-2147023741 (80070483)':
    Automation error
    No application is associated with the specified file for this operation"

    and debugs line "objWSHShell.Run strVCName"
     
  6. WebKing27

    WebKing27

    Joined:
    Dec 16, 2006
    Messages:
    78
    Hey Tarts, Welcome to the forum!

    Did you try the whole process as mentioned by Rollin?

    Just check once again if something is missing or misspelled. ATB
     
  7. tarts

    tarts

    Joined:
    Jan 9, 2007
    Messages:
    2
    Yes i did.

    But vcard files I downloaded are with ".php" extensions instead of ".vcf". Maybe this causes that error? If it is so, maybe somebody can help how to change extensions (it is possible to rename one by one but I have over 300 cards :-( )
     
  8. bp936

    bp936

    Joined:
    Oct 13, 2003
    Messages:
    3,033
    I found cardfile.exe on my backup drive, it's only 91KB but don't know how to attache it here, I can't see *.exe files uploading. It is not a zip file.
    I always backed it up to my next computer since I found it easy to look for info on it and I have a lot of cards too.
    If someone can tell me how to send it, everyone could use it.
     
  9. bp936

    bp936

    Joined:
    Oct 13, 2003
    Messages:
    3,033
    p.s. gotta bring my car into repair, will be back later to see if someone tells me how to send the cardfile.exe
     
  10. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,732
    Can you post one of your sample vCard files? Just change the extension to .txt before posting and I will manually change back to the original extension after downloading.

    Regards,
    Rollin
     
  11. bp936

    bp936

    Joined:
    Oct 13, 2003
    Messages:
    3,033
    sorry I got dalayed
    exe changed to txt
    I attached it as cardfile.txt but can't see it here if it really got attached, so I am just posting this now and see what happens.
     

    Attached Files:

  12. bp936

    bp936

    Joined:
    Oct 13, 2003
    Messages:
    3,033
    yes, it worked, I saved to my desktop and changed extension back to exe and the little old program opend up as I remembered.
    I hope this can help some of you. I use Firefox so I just doubleclicked on the attachement and it asked if I want to save or open it. First save it and rename it to cardfile.exe
     
  13. gigigirrl

    gigigirrl

    Joined:
    Apr 20, 2006
    Messages:
    18
    If I have a folder full of vcards I just select them, drag and drop into the open outlook with the contacts area open and into a white space in the contacts area- where the contacts are listed. I usually do about 20 at a time- it will open 20 windows in succession and I just say ok to each one. If i already have some info about that person it will ask me if I want to update. Simple, Fast, Free.
     
  14. soulraven

    soulraven

    Joined:
    Feb 28, 2008
    Messages:
    10
    hy, i have try this script but....i got a error....... [​IMG]

    please help me.....

    i have put the files in C:\VCARDS
     
  15. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,732
    When the error is thrown click the DEBUG button and then put your cursor over the variable strVCName. The value of the variable should pop up. What value is given?

    Regards,
    Rollin
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/532618