+393713742262
By Assistenza Informatica Firenze/Gennaio 27, 2020/Comments are closed
Se dobbiamo migrare i contatti da Windows Live Mail a Outlook capiremo presto che è un’operazione impossibile. Esportare il .Csv non serve a molto perchè Outlook non riconosce il formato dei campi esportati. Esportare in Vcf può andare bene ma non esiste una modalità per l’importazione BULK in Outlook a meno che non acquistiamo un programma di terze parti.
Il problema si può risolvere con uno script VBA per Outlook.
Esportiamo da Windows Live Mail tutti i Vcf in una cartella : c:\vcards
Spostiamoci su Outlook e premiamo ALT + F11 per aprire il VBA editor.
Andiamo su Tools (Strumenti) > References e selezioniamo : Microsoft Scripting Runtime e Windows Script Host Object Model
Adesso inseriamo questo codice ed eseguiamolo:
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
'original code
'strVCName = "C:\vcards\" & fsFile.Name
'Zeda's fix for spaces in filenames
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
Contatti da Windows Live Mail a Outlook, Migrazione Contatti Windows Live Mail a Outlook, Migrazione Contatti da Windows Live Mail, Migrare Contatti da Windows Live Mail, Importare Vcf file in Outlook, Outlook Vcf import, Outlook importare vcf