Click a cell to Open email msg template and add cell content to Subject field in Outlook

Csmith2303

New Member
Joined
Jun 28, 2017
Messages
1
Hello and thank you for your interest.

I would like to do the following ... please don't be put off by the size of my post ... I am trying to supply as much information and explanation as I can, as briefly as I can.


When a cell is clicked, I would like it to create a new email using an Outlook message template which inserts the cell contents below into the beginning of the without overwriting the rest of the email template subject.

I currently have a spread sheet (IncNumbers) that has columns that contain relative details

I would like to have an option that state if I would like to assign this matter the the individual - this will then pull out all the information below into a template

A sample of the set out is as follows:

Activity / Lead Generator Lead Name Job Title CompanyPartner / Partners Responsible Notes Action Due date
Test event 1 Joe Blogs Partner Bloggs & Co Claire Please email with further information
C:\Users\CTS\AppData\Local\Temp\msohtmlclip1\01\clip_image001.emz
False Pict

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>


I have been using the code below and it works to an extent but cannot pull the dat into the body of the email

any help would be amazing

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
inc = Selection.Value
ans = MsgBox("Assign this action to partner(s)" & vbNewLine & vbNewLine & "Lead Name: " & inc, vbYesNo, "Correct Incident Number?")
If ans = vbNo Then
Exit Sub
Else
End If
Selection.Offset(0, 1).Value = Environ("UserName")
Dim objOut As Outlook.Application
Set objOut = CreateObject("Outlook.Application")
Set obJMailItem = objOut.CreateItem(olMailItem)
strEmailAddr = "Partners Email Pulled Here "
obJMailItem.Recipients.Add strEmailAddr
obJMailItem.Body = "Dear Partner X , you hve been assigned new activy in the business development pipeline document & vbNewLine & vbNewLine Lead Name: & vbNewLine& vbNewLine Lead Description & vbNewLine & vbNewLine Lead Due Date " 'Put the body in here, let me know if you need help with this
obJMailItem.Subject = inc & "-" & "You have a new business development activity"
obJMailItem.Display
Set obJMailItem = Nothing
Set objOut = Nothing
End Sub


many thanks
Chris












Kind regards,
TheShyButterfly
Hi All
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,216,116
Messages
6,128,926
Members
449,479
Latest member
nana abanyin

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