maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Extracting Outlook contacts to VCF (https://talk.maemo.org/showthread.php?t=883)

michaelalanjones 2005-12-29 14:00

Extracting Outlook contacts to VCF
 
I found this code on the web. It will extract all of your Outlook contacts to vcf files. You can save the code as a *.bas file, and import it into Outlook, and run it. I did not write this; I found it. Use it at your own risk. It will create one VCF file for each contact. You will have to change the output location (i.e., "d:\temp\vcarddump\" ) to a folder found on your computer.

I think you are supposed to be able to import VCF files into the GPE PDA stuff (or is it the Inbox contacts?). Anyway, I couldn't get that import to work yet. Can we get a little help, here on the Inbox/Contacts app, Nokia?
__________

What I did with the VCF files, in the meantime, was to copy them to the Bluetooth Inbox on my Motorola Razr (that Santa brought me). When you do this, the Razr imports each one into it's contacts database. At least, I didn't have to re-enter each of my 270 contacts into the cell phone, by hand.


Code:

Sub Export_PAB_to_vcfs()
Dim myOlApp As Outlook.Application
Dim objContact As ContactItem

Set myOlApp = New Outlook.Application

Set olns = myOlApp.GetNamespace("MAPI")

'Whatever this folder is named, put that in for the Inbox
Set myFolderParent = olns.Folders("Mailbox - Jones Michael")

Set myFolderContacts = myFolderParent.Folders("Contacts")

' Get the number of items in the folder.
NumItems = myFolderContacts.Items.Count

' Loop through all of the items in the folder.
For i = 1 To NumItems
    Set objContact = myFolderContacts.Items(i)
    If Not TypeName(objContact) = "Nothing" Then
        If Not objContact.FullName = "" Then
            strName = "d:\temp\vcarddump\" & objContact.FullName & ".vcf"
   
            objContact.SaveAs strName, olVCard
        End If
    End If
Next

MsgBox "All Contacts Exported!"

End Sub


Saanvik 2005-12-29 17:58

Can't you sync your cell phone to Outlook via Bluetooth? I can do that with my Nokia cellphone, and I just assumed all BT phones could do that.

I'm hoping to be able to synch GPE on the 770 via GPESync at some point, but it'll be some time before I get to that point. I'm willing to be a lot of the dependent libraries don't yet work on the 770.


All times are GMT. The time now is 15:16.

vBulletin® Version 3.8.8