Do you mean you cannot create it using CreateObject? The only creatable
object in CDO 1.21 is MAPI.Session.
Recipients object can only be retrieved from Message.Recipients and
Session.AddressBook
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"David Cebrian" wrote in message
...
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