General information
Category:
COM/DCOM and 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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only