Macro to e-mail different sheets in a single mail to e-mail addresses present in excel sheet

swetamies

New Member
Joined
Nov 3, 2018
Messages
2
Existing Macro:- I have an existing macro with a send Email button on clicking it will send separate mails with single attachment to all the owner.present in the excel sheet.


Requirement:- while clicking on send mail button it should first pick an owner i.e. mail recipient from coloum D of "List of Data Providers" tab and then should look for all attachments associated with that so that instead of sending multiple mails to 1 person with a single attachment we can send a single mail with all the attachments associated with them.

I need this on urgent basis if anyone has any suggestions, I would love to hear them.

Columns from where I need to pick up the details are:-

[TABLE="width: 1198"]
<colgroup><col><col><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]No[/TD]
[TD]RAS Metric[/TD]
[TD]Name[/TD]
[TD]Email[/TD]
[TD]CC[/TD]
[TD]Country[/TD]
[TD]Name2[/TD]
[/TR]
[TR]
[TD]6.2[/TD]
[TD]Regulatory Engagement[/TD]
[TD]Sweta[/TD]
[TD]Sweta.Gupta@gmail.com[/TD]
[TD] [/TD]
[TD]India[/TD]
[TD]Sweta Gupta[/TD]
[/TR]
[TR]
[TD]6.3[/TD]
[TD]Open Regulatory Findings[/TD]
[TD]Sweta[/TD]
[TD]Sweta.Gupta@gmail.com[/TD]
[TD] [/TD]
[TD]India[/TD]
[TD]Sweta Gupta[/TD]
[/TR]
[TR]
[TD]6.1[/TD]
[TD]Non-compliance with laws[/TD]
[TD]Sweta[/TD]
[TD]Sweta.Gupta@gmail.com[/TD]
[TD] [/TD]
[TD]India[/TD]
[TD]Sweta Gupta[/TD]
[/TR]
</tbody>[/TABLE]


Thanks,
Sweta
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
It would help to see the existing macro....but something like this needs to be included BEFORE you loop through your recipient list.

Code:
ans = MsgBox("Will you need to add further attachments ??", vbYesNo)
        If ans = vbYes Then
            AttachFileName = Application.GetOpenFilename("Files (*.**)," & _
                                "*.**", 1, "Select File", "Open", True)
 
Upvote 0
It would help to see the existing macro....but something like this needs to be included BEFORE you loop through your recipient list.

Code:
ans = MsgBox("Will you need to add further attachments ??", vbYesNo)
        If ans = vbYes Then
            AttachFileName = Application.GetOpenFilename("Files (*.**)," & _
                                "*.**", 1, "Select File", "Open", True)


I don't want any pop up to ask for attachment, it just pick the attachments with a single mail id, attach all in one mail and send it automatically
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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