View Single Post
  #2   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 attachments from another user

In the

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

section of the code, you can add the appropriate one of the following
(before the .Send command)

.Sender = "SenderName" 'If using 2010.
Returns or sets an AddressEntry object that corresponds to the user of the
account from which the MailItem is sent.

.SendUsingAccount = "Sender Account" 'If using 2007. Returns
or sets an Account object that represents the account under which the
MailItem is to be sent.

.SentOnBehalfOfName = "Name of Person" 'Returns a String
indicating the display name for the intended sender of the mail message.