PDA

View Full Version : Outlook > Excel integration, passing attachment



RoyHB
03-30-2009, 11:29 PM
I receive emails that have an attachment. The attachment is full of binary data.
I have an excel spreadsheet that can open these files, read the data and automatically import it into cells and process it.

What I need to do is have excel start with my worksheet loaded and I need to pass some info from the email header and the path:name of the attachment as well so that the worksheet can load it.

I have a Private Sub Workbook_Open() ready to go, all I need is to figure out how to pass the message header and the path to the attachment to excel.

I don't mind if I have to code a VBE program to sit between the two but I'm stumped as to how to accomplish what I need to.

Thanks in advance...

geek2be
07-02-2009, 02:18 PM
Never used automation in outlook before. Some advice though. Every microsoft office program has an object model. E.g. in excel - workbook and sheet objects which can be used to interact with, export and import data from and into any range of cells. outlook must have an object model with objects to define a message, its header, its contents,attachments e.t.c. Like how do you send mail using code and not even opening (physically with mouse or keyboard) outlook. How well you understand the outlook objects is the key. Salvage what you can from the how do ... i in excel help files. good luck