Composing an email to Outlook from Excel (incl information from different cells)

Jake Berry

New Member
Joined
Aug 15, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there, I'm looking for some help with drafting an email to Outlook from excel.
The Image below shows a typical sheet information. Each column has different data which is needed in one of the email fields.
I would like to be able to press a button and have a draft email appear to the 'contact' , with a pre determined subject, cc list and body.
I believe the subject and body can be drafted as text within the code, as it is not at present within a cell.

Any help would be much appreciated.

1660576240316.png
1660576258553.png
 

Attachments

  • 1660576182171.png
    1660576182171.png
    47.9 KB · Views: 13

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi Portews, thanks for the helping hand! The comment you directed me to helped massively.
I am however still struggling to understand how i can reference the cell i need in the VBA.

For example, in the right most column, i want a button on each row to allow me to compose an email to a recipient in that same row.

I have been trying to use the .TopLeftCell command to reference the correct row.

Screenshot better shows what i mean.

1660827070608.png
 
Upvote 0
I know it's not what you asked for, but I would suggest you select the recipient cell (remove hyperlinks from the email addresses to make selection easier) and push the one button that runs the email macro on whatever recipients are selected rather than a button for each row. It's a lot easier to implement and a less work to maintain as your list of recipients grow. Replace the:

.Recipients.Add "Add your 1st Recipient@x.com"

row in the code on the linked article with:

VBA Code:
        If Not Selection.Value = "" Then
            .Recipients.Add Selection.Value
        Else
            x = MsgBox("Select Recipient", vbCritical, "Program Error!"): End
        End If
 
Upvote 0

Forum statistics

Threads
1,223,881
Messages
6,175,161
Members
452,615
Latest member
bogeys2birdies

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