LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Trapping an invalid email error in Excel VBA code



well.. you ARE working with outlook.

so check help

those are methods of the outlook library to
check validity of email adresses against the address book.

if the eamil addresses are not necessarily
included in the address book then it would be of no use.

and rereading your original question:
try something like..very rough hope you get the gist..

dim SendErrors as collection
set SendErrors = new collection
on error goto SendError
for each x in y
x.send
next
on error goto 0
blah blah

if SendErrors.count 0 then
dim sMsg$,itm
for each itm in SendErrors
sMsg = sMsg & vblf & itm
next
msgbox sMsg
end if
exit sub

SendError:
select case err.Number
case 123 'Adapt to suit
SendErrors.add x
err.clear
case else
debug.print err.number,err.description
stop
end select
err.clear
resume next

end sub







--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Richard Buttrey wrote :

On Thu, 16 Jun 2005 04:53:11 -0700, "keepITcool"
wrote:



you may need to use the resolve method
on each recipient in the recipients collection

or ResolveAll on the recipients collection


Hi,

Thanks for the quick response.

Could you explain a little further please. I'm unfamiliar with the
terminology ResoveAll or the recipients collection.

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL ERROR: This workbook contains INVALID references. ? Boswell[_2_] Excel Discussion (Misc queries) 0 February 27th 10 02:28 AM
How to Sort Invalid Email Addresses? la90292 New Users to Excel 10 February 10th 06 05:36 AM
Error trapping Luis Excel Programming 1 November 11th 04 03:25 AM
Error Trapping Options Change in Excel 1997 Frank DeLuccia Excel Programming 0 April 28th 04 11:08 PM


All times are GMT +1. The time now is 12:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"