Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force a Check Names and conditional send EMail

Status
Not open for further replies.

Blackshark

Programmer
May 7, 2002
48
GB
Hi guys,

I am currently using Access to send a few hundred management reports out in an automated manner. I am using the Mailitem object and setting all the fields, body To etc...

The problem I have is that the company I work for has decided not to insist on indivdual Display Names. We are using Exchange.

Anyone have any code that causes the Check Names facility to run and then check the status (ie. if all names check out OK - underlined, then send email and refile else leave in drafts). If I go to send and there is a problem the system halts on that email.


All help gratefully received

Tim Giles
 
Are you sending seperate e-mails or are you using a distribution list? Using Outlook Objects may be the way to go.
 
Sorry, should have said a bit more in the beginning. I am producing the reports from Access 2000 and sending indivualised reports to individuals using table lookup and VB code to loop through all the people, producing the report for each one, attaching to an email and I hope sending the email.

However, there might be two Giles, Tim 's for instance. For 95% of the people, there is only one display name but for a significant minority there are more than one.


Regards Tim
 
I would create a contact list in outlook (which should be connected to your exchange server) with all those people you want to e-mail. Then you can either import or link those contacts to an access table.
 
Hi all,

Well I solved it in the end by reading through all the Outlook objects/methods!!!

There is a resolveall method which you can call, returns true if all the emails To, BCC and CC entries are picked up and no problems reports. False is returned if the system is unsure about any one or more of the entries.


I now have an auto sending report system that refiles the emails for the uers. Who-pee-do!

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top