BookmarkSubscribeRSS Feed
vicky07
Quartz | Level 8

Hello,

I'm wondering if there is way in SAS to connect to MS outlook and download an excel attachment from XYZ email id. I know we can send emails out with attachments but thinking if we can do it the opposite way. I would much appreciate if anyone can share a sample code or any notes on how to do it.

Thanks!

4 REPLIES 4
MarkBodt_NZ
Obsidian | Level 7

Hi,

I don't have the answer to your question, but a possible lead is: Check out the SAS Sample code:25631 SAS Outlook Data Extractor http://support.sas.com/kb/25/631.html

Mark

MarkBodt_NZ
Obsidian | Level 7

Hi,

Another approach could be to set up a rule in outlook to save email the email to a partuclar folder, then use a VBA script in outlook to detach any excel files to a specific folder. I did a google search on "automatically detach file from email" and it turned up some scripts that may help.

You can then use SAS to read from that folder.

Mark

vicky07
Quartz | Level 8

Mark,

This is helpful.Thanks for your reply!

jakarman
Barite | Level 11

You can open up you MS-outlook mail as a data-store.  All mail content etc should be retrievable.  Just open outlook from data-source...

With Attachements I am not sure how and what is working

Other interfaces (base) - (ftp url mails):

http://support.sas.com/resources/papers/proceedings09/002-2009.pdf pop3 access  
http://support.sas.com/resources/papers/proceedings12/119-2012.pdf all kind of interfacing


---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 6188 views
  • 4 likes
  • 3 in conversation