---
title: "Nokia与Windows的联系人同步"
author: "ralin"
date: "2011-05-15T15:04:38Z"
tags: []
categories: ["编程语言"]
slug: "nokia-windows"
draft: false
lastmod: "2011-05-15T15:04:38Z"
id: 1044648
url: "https://ralin.iteye.com/blog/1044648"
---

Nokia与Windows的联系人同步
2009-06-11
版权声明：转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://shenhh.blogbus.com/logs/40870422.html

1.在Nokia的PC套件中导出的联系人，outlook的联系人文件：pst文件。

2.在导出的pst文件中，因为默认把手机号放在其他电话里，所以可以通过在Outlook里运行下面的VBA，拷贝每个联系人的其他电话到手机号里。在outlook里按alt+f11，就可以出现VBA编辑界面。

Public Function UpdatePhoneNumber()
Dim O As Outlook.Application
Dim F As Outlook.MAPIFolder
Dim ICount As Long
Dim oContact As Outlook.ContactItem
Dim obj As Outlook.ContactItem

Set O = New Outlook.Application
Set F = O.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
For Each obj In F.Items() ' This line gives error: Expression is of type
'Outlook.Items', which is not a collection type.
If TypeOf obj Is Outlook.ContactItem Then
    Set oContact = obj
    oContact.MobileTelephoneNumber = oContact.OtherTelephoneNumber
    oContact.Save
End If
Next

End Function


收藏到：Del.icio.us