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:

[TABLE="width: 1086"]
<tbody>[TR]
[TD]Activity / Lead Generator [/TD]
[TD]Lead Name [/TD]
[TD]Job Title [/TD]
[TD]Company[/TD]
[TD]Partner / Partners Responsible [/TD]
[TD]Notes [/TD]
[TD]Action Due date [/TD]
[/TR]
[TR]
[TD="align: left"]Test event 1 [/TD]
[TD="align: left"]Joe Blogs [/TD]
[TD="align: left"]Partner [/TD]
[TD="align: left"]Bloggs & Co [/TD]
[TD="align: left"]Claire [/TD]
[TD="align: left"]Please email with further information [/TD]
[TD]
C:\Users\CTS\AppData\Local\Temp\msohtmlclip1\01\clip_image001.emz
False Pict [/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>[/TABLE]


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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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