VBA Macro to send Email to added recipients
Hi,
I have a macro file, where as per my selection (Customer Name Selection), I;m able to send email to the specified customer. Like - Once I select Xerox Co. from the filter and click on Send E-mail button, all the fields of Xerox Co gets copied to new workbook and I'm able to send email to the recipient mentioned in the VBA code.
Now what I want is - instead of having the email id mentioned in the vba codes. I'll like to have a column of email id of all the customer in column B for each customer name (abc@xerox.com, xyz@xerox.com).
Thanks for your help in advance
Regards,
Prakash
Attachment | Size |
---|---|
On Filter Selection Send E-mail.xlsm | 21.21 KB |
- E5254730's blog
- Login or register to post comments
- 12750 reads
Some solution
Hi,
Make the following changes into your code:
...
Set fRng = ActiveSheet.AutoFilter.Range
Recp = Join(Application.Transpose(fRng.Columns(2).Offset(1, 0)))
With olMail
.To = Recp
.Attachments.Add wbThis.Path & "\" & "Debit Memo Report.xlsx"
.Subject = "DMR Fee Chargeback"
.Body = BodyStr
.Display
End With
...
Best regards.
somebody answer it soon...
somebody answer it soon... this might comes as handy to me as well...!