Dynamic Subject Line

herman925

New Member
Joined
Apr 9, 2017
Messages
24
I'm a newcomer to VBA and has almost no knowledge to how to handle VBA except the very obvious parts.

I'm working on a Workbook that will help me initiate Mail Merge in the following manners at the moment:

1) A Table in Excel within a Workbook acting as Data Source
2) An Embedded Word Object with the pre-designed Merge Fields inserted
3) Send Emails using the Mail Merge function in Word

However, I'm met with the need to completing the following actions:
1) The subject line has to be dynamic, according to a customer number which exists in the Workbook
2) Based on above, the subject line would be something like 'A cash payment request of client <Customer Number>', whereby the <Customer Number> is the column header of my datasource

After the completion of the above, I would need to also include the signature as designed on Outlook to be added to the end of the message body of the Email. Ideally, I can pass this workbook as a circulation to some of my teammates in the office


Therefore, I'm looking for expertise from you all with the ideal scenario as below:

1) Manually designate a selected range of customers (e.g. from Customer 1-100 - because the datasource is also an archive and the old data won't be sent to the customers again, but they have to be visible for future references
2) Press a button that initiates the creation of e-mail based on the selected range of customers
3) Created e-mails should have subject lines such as described previously
4) The body text is HTML based (with formatting and Tables) that have mergefields acquired from the datasource (that's why I used Word since I don't know how else to do it)
5) E-mail sending can be automatic or manual (means I can choose to have them thrown into Outbox automatically, or they can just be opened windows waiting for my final review)



Post Script:
I understand that there are add-ins that do absolutely exactly what I wanted like the Mail Merge Toolkit but they are for personal uses only and they require a fee. I cannot convince my organisaiton to purchase these as the workbook is only for a small number of teammates (20-30). Please understand that I've explored many options but I know that VBA can do the trick and I'd have to seek help because I cannot really complete this on my own



Thank you for your read, and help, if any.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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