VBA to export outlook email (individual email) to excel file with userinputs

PresidentEvil

New Member
Joined
Jan 2, 2021
Messages
15
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

Its been a while and I was hoping to learn more of VBA Coding. So here I'm with a request for VBA code to export outlook email (individual) to an existing excel file.

So here is what I'm wanting the code to do:

When I open an email in Outlook and press a hotkey (in groupmail inbox)., the macro should export the following data in an existing excel file name say 'test'. This file might be open or closed. But macro should be able to work if either of condition is met:
1. Column A - Current/Present Date
2. Column B - SubjectLine
3. Column C - Email Body
4. Column D - DATE (This date should be picked from a textbox wherein user enter the date. This text box should appear when hotkey is pressed)
5. Column E - Text (This text should be picked from a textbox wherein user enter the data [after 'date' textbox])
6. Column F - text - "Pending"
7. Column G - text (This text should be picked from a textbox wherein user enter the data [after column E textbox])

So to sumamrise, if I press hotkey on an email, a textbox should appear to collect data for Column D, F & G. Then once this data is filled by user, all these data along with email information must be inserted in the excel file. Once that is done save the excel file. This process should be done every time I press the hotkey.

I'll be really grateful if you could provide me with the code for this. I understand there are many code available online but that doesn't work as I'm wanting to. Please help.

Thanks.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,139
Messages
5,835,624
Members
430,372
Latest member
contentment

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
Top