Macro
Macro
objEmail.from = "[email protected]"
bStarted = True
End If
With Dialogs(wdDialogFileOpen)
.Show
End With
' Show an input box asking the user for the subject to be inserted into the email messages
message = "Enter the subject to be used for each email message." ' Set prompt.
' Iterate through the Sections of the Source document and the rows of the catalog mailmerge
document,
With oItem
.Subject = mysubject
.Body = Source.Sections(j).Range.Text
Datarange.End = Datarange.End - 1
.To = Datarange
For i = 2 To Maillist.Tables(1).Columns.Count
Datarange.End = Datarange.End - 1
Next i
.Send
End With
Next j
Maillist.Close wdDoNotSaveChanges
If bStarted Then
oOutlookApp.Quit
End If
'Clean up
End Sub