I am working on an import script based on several scripts I've found on here so far, but I need some help. The script already deletes all contact items in a public folder and I have the csv file with the information that needs to be loaded. Unfortunately I haven't been able to work out the import routine. I've removed my attempts so that they don't confuse the situation.
I need the information in the csv file loaded as outlook contacts. I would like the script to ignore contacts without an entry in the sn column. Lastly, I need this to be a standalone script (not an Outlook macro) as this will be an automated process.
Const olFolderContacts = 10
Const olPublicFoldersAllPublicFolders = 18
Dim olkApp, olkSes, olkContacts, olkPublic, olkContact, intIndex
Set olkApp = CreateObject("Outlook.Application")
Set olkSes = olkApp.GetNamespace("MAPI")
Set olkContacts = olkSes.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("TBC Directory").Folders("TBC Directory")
'Delete all contacts
For intIndex = olkContacts.Items.count To 1 Step -1
Set olkContacts = Nothing
Set olkPublic = Nothing
Set olkContact = Nothing
Set olkSes = Nothing
Set olkApp = Nothing