Get Subject from Email

kdave

Board Regular
Joined
Feb 23, 2015
Messages
77
Hello All!

I have been searching and searching and cannot seem to find something that will help me. Here's the gist of what I'm trying to do:

The user will receive an email with a link to an Excel file in it. When the user opens the file, I would like to trap the subject of that particular email. I need to trap it using Excel. I cannot write an Outlook macro, my company will not allow it. The user may have several emails with the link in it, but the subjects will be different. Parts of the subject will be the same, but if I search, I will find the first match and not the potential correct match.

For example: The user may receive emails that say

Test Email - One
Test Email - Two
Test Email - Three

If they open the link in the third email, I would like to trap the subject "Test Email - Three". If I search the emails for "Test Email -", I will find the first one and return that.

Does anyone have any suggestions for me? As a side note, I am not new to VBA. I'm just stuck!

Karen
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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