Macro for Mail Merge with CC and Attachments

anantashesh

New Member
Joined
Dec 15, 2014
Messages
8
Hi,

Have been using the forums for a long time for various excel related tips and help. However I cannot find a solution to my current problem and want your help. :)

I have to mail multiple people, both in "To" and "CC", with each mail containing a separate PPT. Now, I have found macros for mail merge with CC and mail merge with attachments. What I am looking for is a combination of both.

Ideally what I would like the Macro to do is pick multiple "To" from one column, "CC" from another column and give me a pop up window asking me to attach the PPT for each mail.

Any help in this direction will be greatly appreciated.

Thanks!!!
 
Hi adam,
Thank for lovely elaboration.. and the solution suggested.
I am newborn for this type of Macro.. :laugh::laugh::laugh:

How ever really interested to learn.

Moreover my request is similar to anantesh. the only difference is instead of attaching the PPT file.
My requirement is series of ROW's to be copy pasted for a particular email id.

Example :-
[TABLE="width: 748"]
<colgroup><col><col><col span="9"></colgroup><tbody>[TR]
[TD]TO[/TD]
[TD]CC[/TD]
[TD="colspan: 9"]Data to be Moved (This list is BIG … and to be pasted in the mail body )[/TD]
[/TR]
[TR]
[TD]a@b.com[/TD]
[TD]c@d.com[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[/TR]
[TR]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[/TR]
[TR]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[/TR]
[TR]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[/TR]
</tbody>[/TABLE]


I believe have explained by concern.

if you can please help on this.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi adam,
Thankyou for lovely elaboration.. and the solution suggested.
I am newborn for this type of Macro.. :laugh:

However really interested to learn.

Moreover my request is similar to anantesh. the only difference is instead of attaching the PPT file.
My requirement is series of ROW's to be copy pasted for a particular email id.

Example :-
[TABLE="class: cms_table, width: 748"]
<tbody>[TR]
[TD]TO[/TD]
[TD]CC[/TD]
[TD="colspan: 9"]Group of Data to be Moved (This list is BIG … and to be pasted in the mail body )[/TD]
[/TR]
[TR]
[TD]a@b.com[/TD]
[TD]c@d.com[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[TD]Abc[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[TD]qwe[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[TD]AD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[TD]asdfg[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[TD]dgj[/TD]
[/TR]
</tbody>[/TABLE]

Then the next set of data for Different TO & CC.


I believe have explained by concern.

if you can please help on this.
 
Upvote 0
Where to insert this code in Outlook or in Excel.

Can you please share the steps, I am stuck in mecro pasting.

I have created excel with my data base and To having Column in AD & CC in AE.

Other fields are in A to AC.

Please help.
 
Upvote 0
Bump !! I have the same question . where to paste or run the macro , word or outlook ?

secondly where to put cc or bcc receipt list
 
Upvote 0
Change .Send to .Display and run it again. You should then be able to check all the names are valid.
Code:
        .Attachments.Add fName, olByValue
        .Display

/AJ

I copy pasted the code in word module. When I run it it says compile error. User-define type.not defined and debugger highlites the first line of "Public Sub Testmail ()"

Please given step by step guidance to make it easy from scratch
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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