As you know, in the begining of this thread, I showed the the Userfom and the connected Module, has the Useform has the fields of the contact, I run it, and decide what words to put in the fields of each contact. So we just trying to set it up so that I select task(s) it goes to the contact of each task and does the same.
I was giving by someone else the following code to use for the Module and the error is that an object cannot be found and it yellows the following line:
Set c = f.items(conts(cq))
Public Sub UpdateContactFieldTasks(ByVal FieldName As String, ByVal myValue As String)
Dim tsk As taskItem, c As contactItem, f As MAPIFolder
Set f = Application.GetNamespace("mapi").GetDefaultFolder(olFolderContacts)
For Each tsk In ActiveExplorer.Selection
conts = Split(tsk.ContactNames, ",")
For cq = 0 To UBound(conts)
Set c = f.items(conts(cq))
c.UserProperties.Item(FieldName).value = myValue
c.Save
Next
Next
End Sub