Link to home
Start Free TrialLog in
Avatar of scotch1989
scotch1989

asked on

Save Outlook 2010 Attachment to Excel file

I want to save an email sent to me weekly in a shared folder.

The email contains an excel table and it is also zipped.
ASKER CERTIFIED SOLUTION
Avatar of Shanan212
Shanan212
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scotch1989
scotch1989

ASKER

Thanks for the solution.

I'm getting an error though. ' An object couldn't be found'.

Why do you think the error is about?
Ah, you havent done the last step.

To enable library

on your VBA editor, click Tools -> References
Check
'Microsoft Office ## Object Library' (## denotes number)
'Microsoft Excel ## Object Library' (## denotes number)
'Microsoft Outlook ## Object Library' (## denotes number)
I'm still getting the error.

Set myFolder = myFolder.Folders("Inbox")  ------ Is this right?
Looks right. But you see the problem with this code is that it saves all files as 'zip' files.

So its highly recommended that you create a different folder for these weekly emails (use a rule) and then set that folder in the above code.

Try sending yourself an email with a zip file. Then put that email in the folder you created and run the code.
How do I run the codes as a script?
I dont get what you mean. You mean from a button? Since this is going to be inside excel, it has to be run from Excel though.

Is it working?
Sorry, now I'm confused.

I have to run through excel and not from Outlook?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think I'm confuing you too.

This is my question.

The code that you provided, how do I run it? The code is for Outlook 2010 right?

----
This is what I'm doing.
I'm running the code in Outlook by clicking the macro button.
oh ok. Thanks :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial