Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Using Exvba can I open an outlook message and then its excel workbook

  Asked By: Rainhard    Date: Mar 14    Category: MS Office    Views: 943
  

how can I use excel vba to open an outlook message and then its
attachment which is an excel workbook. I want to use the data inside
the attachment

Please help

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Jackson Bouchard     Answered On: Mar 14

VBA for outlook  is not the same as for other apps because you have to do a lot
more set-up work.

Have you thought how you would identify the particular message  to deal with?
What if there were two relevant ones?

Would it be easier to use one of the (fairly cheap) outlook addins to extract
all attachments to a directory so you only had to find an excel  file in a
particular directory? IMO _anything_ is preferable to trying to get an
outlook macro to behave itself!

 
Answer #2    Answered By: Isaac Williams     Answered On: Mar 14

I have some answears now to reply you.

I have identified the poits what you have asked me.

To identify a particular message

1. from name (Display name of the sender)
2. from address (email address of the sender)
3. subject (subject is always same for example "Service Report dd-mm-
yyy")
4. There is always an attachment (Attachment file name:
SERREP_ddmmyyyy.xls)
5. Moreover the body of the message  is also always the same
for example
Dear Sir,

6. All mail are different due to the above 5 points.
7. My inbox is well structured with folders and sub folders and
further subfolders
8. I have with me a well defined address book (email comes only from
a known member)
9. Before mailing to exel vba  group I have also tried some of the
third-party software from www.mapi.com. They are not suitable for my
kind of problem. I have used an email attachment extractor here the
excel file name may differ because that name is fead by an operator
manually.

Hope receive help  from you. I am not much into programming but I
have some programming experience with "C".

 
Answer #3    Answered By: Luki Fischer     Answered On: Mar 14

I really think you would be better off avoiding programming Outlook. It
appears you are going to need to do this once a day when you receive the
email. It is the receipt of the e-mail that will start the process. I would
suggest that you open  the attachment as normal (manually from Outlook) and
then run any further code from a macro stored in personal.xls (so that it is
available when you are looking at the opened attachment.

If you are determined to write code for the Outlook object model, I would
suggest posting your query on the Outlook VBA forum.

 




Tagged: