D
David Cebrian
Hello,
Anybody can help me with that problem.
I can not instanciate a variable of type MAPI.Recipients (CDO)
My code fails when I try to use the method Add.
The application returns me that the object do not exists.
Thanks,
My code inside a Form
Public SMScontactes As Outlook.Recipients
Dim ContactesSMS As MAPI.Recipients
Private Sub treuLlistaDis()
Dim i, k As Integer
Dim recipAux As Outlook.Recipient
Dim recipAct As Outlook.Recipient
Dim chivato As String
Try
For i = 1 To SMScontactes.Count
recipAct = SMScontactes.Item(i)
If Not SMScontactes.Item(i).AddressEntry.Members Is Nothing Then
For k = 1 To SMScontactes.Item(i).AddressEntry.Members.Count
recipAux =
SMScontactes.Add(SMScontactes.Item(i).AddressEntry.Members(k).Name)
recipAux.Resolve()
ContactesSMS.Add(recipAux.Name, recipAux.Address, , recipAux.EntryID)
'FAILS <-----------------
Next k
recipAct.Delete()
End If
Next i
Catch ex As Exception
MsgBox("Error a TreureLlistaDis - " & ex.Message & " - " & chivato)
End Try
End Sub
Anybody can help me with that problem.
I can not instanciate a variable of type MAPI.Recipients (CDO)
My code fails when I try to use the method Add.
The application returns me that the object do not exists.
Thanks,
My code inside a Form
Public SMScontactes As Outlook.Recipients
Dim ContactesSMS As MAPI.Recipients
Private Sub treuLlistaDis()
Dim i, k As Integer
Dim recipAux As Outlook.Recipient
Dim recipAct As Outlook.Recipient
Dim chivato As String
Try
For i = 1 To SMScontactes.Count
recipAct = SMScontactes.Item(i)
If Not SMScontactes.Item(i).AddressEntry.Members Is Nothing Then
For k = 1 To SMScontactes.Item(i).AddressEntry.Members.Count
recipAux =
SMScontactes.Add(SMScontactes.Item(i).AddressEntry.Members(k).Name)
recipAux.Resolve()
ContactesSMS.Add(recipAux.Name, recipAux.Address, , recipAux.EntryID)
'FAILS <-----------------
Next k
recipAct.Delete()
End If
Next i
Catch ex As Exception
MsgBox("Error a TreureLlistaDis - " & ex.Message & " - " & chivato)
End Try
End Sub