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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening email attachment with code

Status
Not open for further replies.

mrf1xa

Technical User
Jan 14, 2002
366
GB
I have an Access Database which monitors an Outlook inbox and performs certain automated functions for incoming mails meeting certain criteria- generating reference number, mailing response etc.
I'd like to take this a stage further if possible. Relevant incoming messages will have an Excel file attached, I would like to open this and extract key data. I know how to extract and process data from an open spreadsheet, but can someone give me a pointer as to how to open the mail attachment please?

Thanks in anticipation!

Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
 
If memory serves, the MailItem object has an attachments collection.

The attachment object has a SaveAs method that will allow you to save the attachment.

 
Many thanks, will have a look at that

Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top