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
40
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,539
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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

CarlStephens

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

Watch MrExcel Video

Forum statistics

Threads
1,118,890
Messages
5,574,851
Members
412,622
Latest member
Micks578
Top