如果不是某人用的国产手机,我还真不知道现在好多国产手机联系人的导出格式居然是vcf。而且,中文姓名都乱码了。而且而且outlook不支持批量将这一坨一坨的vcf文件导入。
没办法,上网搜了一通,问题一一解决。
1、vcard乱码。有个叫做VCFEncoding的小程序,操作很简单,打开一看便知,几秒钟就让好多坨乱码的vcard姓名显示正常了。点击下载
2、将vcard批量导入outlook。
(1)打开outlook2003,按下alt+F11,调出Visual Basic编辑器;
(2)工具——引用,找到Microsoft Scripting Runtime和Windows Script Host Object Model勾选,确定;
(3)插入——模块,复制粘贴以下代码,并保存;
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
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
(4)把所有的vcard文件存放至C盘,vcard目录下(当然你也可以放在别处,只要修改以上代码中相应的路径);
(5)回到outlook界面,工具——宏——运行宏,如果出现“该工程的宏被禁止”之类的提示,在工具——宏——安全性中的选项改为中或者低即可。
最后,等导入vcard的窗口不停的闪现完之后,就可以把outlook联系人同步到新手机啦。哦也~
共有 0 条评论