create email by double clicking a cell

AleinPump

New Member
Joined
Aug 30, 2018
Messages
2
Guys,

I am trying to create a document, where if I double click on cell A2 for example, it will create an Outlook email with B2 as the Subject line and C2 as the body of the email (which would be more than 255 characters most of the time).
Same with A3-B3-B4 etc
The email to which I will be sending will always be the same.
Is this possible?

Code:
[TABLE="width: 319"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: left"][B]case[/B][/TD]
[TD="align: left"][B]subject[/B][/TD]
[TD="align: left"][B]body[/B][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: left"]case1[/TD]
[TD="align: left"]This is case 1[/TD]
[TD="align: left"]bla bla about case 1[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: left"]case2[/TD]
[TD="align: left"]This is case 2[/TD]
[TD="align: left"]bla bla about case 2[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: left"]case3[/TD]
[TD="align: left"]This is case 3[/TD]
[TD="align: left"]bla bla about case 3[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: left"]case4[/TD]
[TD="align: left"]This is case 4[/TD]
[TD="align: left"]bla bla about case 4[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: left"]case5[/TD]
[TD="align: left"]This is case 5[/TD]
[TD="align: left"]bla bla about case 5[/TD]
[/TR]
</tbody>[/TABLE]

Thank you very much in advance for any assistance!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hello and welcome to the Forum :)

This will do what you want;

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Cancel = True
    With Target
        Set OutApp = CreateObject("Outlook.Application")
        OutApp.Session.Logon
        Set OutMail = OutApp.CreateItem(0)
        On Error Resume Next
        With OutMail
            .To = "person@internet.com"
            .Subject = Cells(Target.Row, "B").Value
            .Body = Cells(Target.Row, "C").Value
            .Display '' Change to .Send to automatically send
        End With
        On Error GoTo 0
        Set OutMail = Nothing
        Set OutApp = Nothing
    End With
End Sub

HTH
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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