Generate email based on selection.

riteshpatel

New Member
Joined
Dec 24, 2011
Messages
1
Hi

I am currently working in a finance industry and often have to send email to clients asking for their bank account and credit card statements etc etc. I want to create a form in a spreadsheet with options of documents.
e.g. Left hand side of the form. Label 1 and Label 2 and right hand side of the form documents checkbox list like, bank account statements, tenancy agreement, employment contract etc etc.

and then based on the selection I would like to generate an email with a subject line "Documents required for Label 1" or "documents required for lable 2" with a text body

Hi

Please provide the following documents.

"list of documents here with bullet points" (based on the selection of form)

Your help will be highly appreciated. Thank you.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I can probably help if you use a userform but don't know enough about sheets as forms. I'm mainly an Access guy. You would have to find vba for sending email and modify it to suit your situation as a start as well as build the userform. That means uploading a file somewhere because you can't attach files here.

I would suggest using a listbox on the userform and set its multi select property to true. User selects 1 or more items and button code loops over the selections so that they can become part of the email body. List items could come from a contiguous sheet range so that when a new doc requirement arises, you just add/insert in that sheet column. Otherwise, you can use hard coded values, or a value list for the listbox which is likely not much better than having to add controls (checkboxes). Either way, you'd have to modify code as well, so IMO, a column range is the way to go.

If you want bullet points in the email, you'll have to find code that uses .Htmlbody, otherwise just use leading spaces and dash, e.g.
VBA Code:
Please provide
    - account
    - agreement
    - contract
 
Upvote 0

Forum statistics

Threads
1,224,531
Messages
6,179,379
Members
452,907
Latest member
Roland Deschain

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