Importing email bodies from specific sub folder in Outlook

crzytimes

New Member
Joined
Oct 28, 2016
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Good Evening everyone!

I'm trying to configure a VBA Macro in excel that will import the body of emails into separate lines. Mostly concerned with getting the link between Outlook & Excel working. I have some novice experience with VBA, but this is proving much trickier than I anticipated after googling some examples.

I've already activated Microsoft Outlook 15.0 Object Library.

The emails I want imported will be in a subfolder called "AutoScrap". The title is also always the same "Failed Scrap Report" & always from the same sender.

Email body arrives as shown below (any identifiable information is XXXX). There is never anything else. Could be just 1 line and usually less than 10 lines. The idea is to create a log (with headers in the 1st column) that will start with the next empty line and continue done the worksheet each time the report is ran from my inbox. I can write the macro that will delete duplicate lines.

Code:
[FONT=arial]02647720  XXXX  XXXXXXXXXX         20180709  002924  Deficit of SL Unrestricted-use 2 PC : XXXXXXXXXX XXXX XXXX[/FONT]
[FONT=arial]02647718  [/FONT][FONT=arial]XXXX  XXXXXXXXXX         20180709  002922  Deficit of SL Unrestricted-use 2 PC : XXXXXXXXXX XXXX XXXX
[/FONT][FONT=arial]02647714  [/FONT][FONT=arial]XXXX  XXXXXXXXXX         20180709  002920  Deficit of SL Unrestricted-use 10 PC : XXXXXXXXXX XXXX XXXX[/FONT]


I appreciate any assistance getting this started.
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,215,639
Messages
6,125,970
Members
449,276
Latest member
surendra75

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