Macro code to import attachment from Outlook to Excel sheet?

shenming

New Member
Joined
Mar 24, 2015
Messages
2
Dear all,


I am using Macro in Excel to automate all the tasks I do in a day. I need you help.


I am using Excel to check daily inventory. At the moment, I have to copy & paste the stock data which is in *.txt format into excel sheet, then pivottable, format bla bla bla... The stock data will be sent to my email as an attachment *.csv (I am using Microsoft Outlook) everyday at 7:am. I am wonder if there is any code can help Excel to load the attachment automatically from my email or wherever into excel sheet without copying & pasting manually. Then I can format or do whatever I want with the loaded attachment in Excel.


I am so thankful if everybody have some idea about that.!


p/s: I have also attach the data sent to my email everyday (already saved as *.xlsx due to posting policy) if you want to see them. I want to load them in my macro template by hitting 1 button :)


Best regards,


Nguyen Bao An
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I am wondering if the QueryTables.Add method will help you - this can be used to get the data of a text file into your spreadsheet, then you could run some code to check how many rows there are in the new data and to perform the necessary formatting. To try this, you could record a macro using the Data ribbon then Get External Data From Text. Let us know how it goes. Btw, I couldn't see your attachment.
 
Upvote 0
I am wondering if the QueryTables.Add method will help you - this can be used to get the data of a text file into your spreadsheet, then you could run some code to check how many rows there are in the new data and to perform the necessary formatting. To try this, you could record a macro using the Data ribbon then Get External Data From Text. Let us know how it goes. Btw, I couldn't see your attachment.

Thank you so much for suggesting, andrewafresh. But the attachment is still in email. Can we by using macro load it directly from email?
Sr I cannot find the way to upload attachment for your reference. please see on the link below:

https://drive.google.com/open?id=0B0jZEbUoH-ihVXlnYjJZZDdCY0U&authuser=0
 
Upvote 0

Forum statistics

Threads
1,216,109
Messages
6,128,883
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top