Royalbloodi
New Member
- Joined
- Oct 31, 2023
- Messages
- 16
- Office Version
- 365
- Platform
- Windows
I really don't know how to state this one better.
I'm creating a spreadsheet that will take a customer's email address and Generate an email to inform them who the contacts for their selected job area are. I designed a sample spreadsheet:
And my goal is to produce the email so it has a link in it (at the HERE) that will automatically open a new email with their work contacts in the To: and automatically populate the subject with the Job area.
****This is what I can't figure out****
How/what do I put in VBA or Formulas to make this Mailto link in the customer's email above, that would populate the email below?
In this case, the email created by the mailto link would essentially look like:
The VBA for the "Generate Email Button" is:
And the Array and Cell Formulas are as follows:
F3 FORMULA:
G3 FORMULA:
H3 FORMULA:
D13 FORMULA:
Help please. I'm going insane.
Thanks!
I'm creating a spreadsheet that will take a customer's email address and Generate an email to inform them who the contacts for their selected job area are. I designed a sample spreadsheet:
And my goal is to produce the email so it has a link in it (at the HERE) that will automatically open a new email with their work contacts in the To: and automatically populate the subject with the Job area.
****This is what I can't figure out****
How/what do I put in VBA or Formulas to make this Mailto link in the customer's email above, that would populate the email below?
In this case, the email created by the mailto link would essentially look like:
The VBA for the "Generate Email Button" is:
VBA Code:
Private Sub CommandButton1_Click()
'------------------------------------------------------------------|| GENERATE PRE-ASSIGNED EMAIL ||------------------------------------------------------------------
Dim OutObj As Object, OutMail As Object
Set OutObj = CreateObject("Outlook.Application")
Set OutMail = OutObj.createitem(0)
With OutMail
.Display
End With
Sign = OutMail.HTMLbody '-------------------------------------------------------------------------------|| Define the user's HTML signature as Sign.
With OutMail
.to = Range("B13").Value
.Subject = "Company Name - Order Updates and Contact Information - " & Range("B14") & ", " & Range("B15")
.HTMLbody = _
"<p style=font-size:20px>" & "Dear " & Range("A13") & ",<br><br>" & "Your Order Form for " & Range("B14") & " has been submitted to the proper department and they will process your information and contact you with further updates." & _
" If you need to reach out with any questions or concerns, you can reach them by clicking HERE" & "<br><br>Sincerely," & _
vbNewLine & Sign '-------------------------------------------------------------------------------|| Add the user's HTML signature to the end of the email.
End With
End Sub
And the Array and Cell Formulas are as follows:
F3 FORMULA:
Excel Formula:
=UNIQUE(FILTER(A2:A10,A2:A10<>""))
G3 FORMULA:
Excel Formula:
=FILTER(B2:B10,C2:C10=D13)
H3 FORMULA:
Excel Formula:
=FILTER(A2:A10,C2:C10=D13)
D13 FORMULA:
Excel Formula:
=TEXTJOIN(", ",,H3#)
Help please. I'm going insane.
Thanks!