Hi
The below Vba code runs a mailmerge of data stored in an excel called "mailmerge.xls" fine. However, When it does run it always asks me to chose which sheet I want to mailmerge which is a bit annoying when i want the process to be fully automatic.
Code
ActiveDocument.Mailmerge.MainDocumentType = wdFormLetters
ActiveDocument.Mailmerge.OpenDataSource
Name:="H:\MBI\MailShot\Mailmerge.xls"
With ActiveDocument.Mailmerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
Display More
What line of code do i need to add to make the macro automatically mailmerge "sheet1" of mailmerge.xls?
Thanks in advance for your help!
James