![]() |
|
#1
|
||||
|
||||
![]()
Hi wowow,
The link I posted has all you need - a link to the basic macro, plus the code (and instructions) to modify it for adding the CC stuff.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]() Quote:
I just repalce a part of the code of mail merge with attachment by the code that uses to allows CC and BCC in mail merge as the follows: I replaced Code:
With oItem .Subject = mysubject .Body = Source.Sections(j).Range.Text Set Datarange = Maillist.Tables(1).Cell(j, 1).Range Datarange.End = Datarange.End - 1 .To = Datarange For i = 2 To Maillist.Tables(1).Columns.Count Set Datarange = Maillist.Tables(1).Cell(j, i).Range Datarange.End = Datarange.End - 1 .Attachments.Add Trim(Datarange.Text), olByValue, 1 Next i .Send End With Code:
With oItem .Subject = mysubject .body = ActiveDocument.Content Set Datarange = Maillist.Tables(1).Cell(Counter, 1).Range Datarange.End = Datarange.End - 1 .To = Datarange For i = 2 To Maillist.Tables(1).Columns.Count Set Datarange = Maillist.Tables(1).Cell(Counter, i).Range Datarange.End = Datarange.End - 1 .Attachments.Add Trim(Datarange.Text), olByValue, 1 Next i .CC = "Firstemailaddress; secondemailaddress" .BCC = "Firstemailaddress; secondemailaddress" .Send End With Now I wonder how to use with the new code. Should I use VBA editor to embed the code in the letter that is to generate and send multiple mails or I make a separate marcro to run when I open the letter to merge emails? Thanks. |
![]() |
|