View Single Post
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default email merge with multiple recipients in "To", "CC" & "BCC"

In the following section of the code you just use the .CC and .BCC features
of the Outlook Object Model as follows

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

Likewise, you can get the subject of the email from a cell in the table in
the same way as the code gets hold of the attachments or the .To address.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Raghu" wrote in message
...
Dear Doug,
thanks of the response. while the link which you sent takes care of the
attachment logics can you please help me coding for selecting mulitiple
recipients.

i'm tyring to call the excel information into word & its mailed to the
individual employees. the problem comes when i need to cc or bcc their
managers etc.
same way if i have the subject captured in a seperate column (in excel)
can
that be used while mailing the individuals.

since i'm quite poor with coding so your help in this regard would be a
great relief. thanks once again.

"Doug Robbins - Word MVP" wrote:

You cannot do this directly with mail merge and will need to use the
Outlook
Object Model. The code in the article "Mail Merge to E-mail with
Attachments" at:

http://word.mvps.org/FAQs/MailMerge/...ttachments.htm

will give you an idea of how to go about it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Raghu" wrote in message
...
hi,
i don't find its possible to have multiple reciepients for a single msg
in
word email merge & even the subject line is not changable.

can any body help me in sending emails through MS Word2003 merge to
multiple
recipients (i.e. same message with a "To", "CC" etc).

also the logic to change the subject line for each reciepient.

please help asap,.
thanks
raghu