Copy Outlook contact field value to another field

CrazyDD

Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I didn't see an option for Office 365 Pro Plus in your list of Outlook version, so chose Outlook 2016 32 bit for lack of knowledge on which would be closest fit.

I erroneously placed data in the Computer Network Name which won't export with the CodeTwo Outlook Export tool or the native Import/Export tool. The value will appear in a List View but onerous to copy and paste one by one. I tried the code below, but didn't work for me. Would appreciate any help you can give.

Sub CopyComputerNetworkNameToCallback()

Dim objNS As Outlook.NameSpace
Dim objItems As Items
Dim objItem As Object

Set objNS = Application.Session
Set objItems = objNS.GetDefaultFolder(olFolderContacts).Items

For Each objItem In objItems
' make sure you have a Contact item
If objItem.Class = olContact Then
' copy data
objItem.Callback = objItem.ComputerNetworkName
objItem.Save
End If
Next

Set objItems = Nothing
Set objItem = Nothing
Set objNS = Nothing

End Sub

Thank you for you assistance.

Cheers,

DD
 

CrazyDD

Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Never mind, I found my error. Callback should be CallbackTelephoneNumber . Darn it! Apologies for wasting forum space

Cheers,

DD
 
Top