Email address from Excel spreadsheet

I have an Excel spreadsheet that I use to share an email distribution list. This list is updated almost daily by multiple people. There are 3 of us that rotate sending out a report created in SAS and emailed via SAS each day to the people on the spreadsheet. Is there a way to read in all of the email addresses and put them in the TO: variable and send out this report ? We currently use 7 distribution list for this task, but I would rather not update them each day and I don't want to create a new distribution list in Outlook and update it each day I have the duties.

PROC PRINT DATA=Trythis ;VAR DOCTNMBR AGENCY OFFICER STATUS VERSION RPTABLE;*WHERE STATUS <> ' ';TITLE2 'INCOMING ELECTRONIC ACCIDENT FILES THAT SHOW A TRANSMISSION STATUS.';TITLE3 'VALID STATUS VALUES ARE ACCEPTED, TRANSMITTED AND NON REPORTABLE.';TITLE4 'REPORTS WITH A STATUS OF OPEN SHOULD NOT BE PROCESSED AND RETURNED TO THE AGENCY TO BE REDONE.';*TITLE6 'A STATUS A VALIDATED MEANS THE AGENCY IS NOT TRANSMITTING THROUGH TRACS UTILITIES.';

data _null_; file DOEMAIL; put ' '; put 'Greetings,'; put ' '; put ' '; put 'Attached is a listing of accident reports received and\or processed today. Please check to see that all the reports you sent are listed here.'; put ' '; put 'Amends are not listed on this report. '; put ' '; put "Note that any accidents you send after 7:00 a.m. may not be processed until the next day. Be sure to check tommorrow's report for the files you sent."; put ' '; put ' '; put 'Thank you.';run;

Re: Email address from Excel spreadsheet

The most straightforward thing I can think of is to set up something in Outlook automation to gather the names, and write them out to a flat file. Then your SAS program can just read that and use the email addresses. The problem, of course, is that you're outside of SAS to do this.

Hopefully someone else will know a way that SAS can access Outlook internals.