Information générale
Catégorie:
COM/DCOM et OLE Automation
>If there is a bad email address, is it possible to delete the email address after it has being added to the receipt list.
>I’m assuming one has to add it (.Recipients.Add) in order for the resolve to work.
> With loNew.Recipients.Add(thisform.listmgr1.array[1,i])
> .Type = olTo
> If Not .Resolve
> Messagebox("Unable to resolve address.")
>*****************************************************************************
> This is were I would like to Delete the email address
>*****************************************************************************
> Endif
> Endwith
You need to call the Delete method of the recipient object. Your best bet is to break your call to Add out of the WITH and grab a reference:
oRecip = loNew.Recipients.Add(...)
WITH oRecip
* as before
IF NOT .Resolve
.Delete
ENDIF
ENDWITH
I'm not sure whether you can use the Delete method inside a WITH like that, given its nature. You'll have to test.
Tamar
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement