VBA code for opening an email in Lotus Notes and copying/pasting the To:, Subject: Email Body: which is stored in a sheet.

CarlStephens

New Member
Joined
Sep 25, 2020
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
Hello All,

I am pretty new to coding, and I was wondering whether there is a VBA code that will will open an email (in Lotus Notes that will already be open) and copy an email address and subject line stored in the spreadsheet, and paste the information in the respective email fields, along with the body of the email, which is in the spreadsheet too. An example of the spreadsheet is below:

Thank you for your time, and I shall look forward to hearing from you soon.

1601049343897.png
 

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,465
Thank you John. I am forever indebted to you. I am getting a syntax error below red line....do you know what the cause of this is?

View attachment 23430
Sorry, I deleted an ampersand on that line. It should be:
VBA Code:
                   .InsertText vbLf & "File attached: " & Mid(Attachments(i, 1), InStrRev(Attachments(i, 1), "\") + 1)
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

CarlStephens

New Member
Joined
Sep 25, 2020
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
Thanks again John, you have helped immensely. Really you have!
 

Watch MrExcel Video

Forum statistics

Threads
1,114,276
Messages
5,546,928
Members
410,763
Latest member
TSVIVI
Top