A
Alex
Hi everyone
I've created a mailmerge template for my work colleges
that when opened automatically runs the following code.
Sub autonew()
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub
However, end users being end users, they still aren't
satisfied, so I hope you guys can help.
Requirements:
The macro must run on Word 97, 2000, XP and 2003
The Full Recipient list will always be merged into the
document
Problem with Current Code:
Even though the current code does all the hard work for
them, they don't like the fact that it produces two
documents, The document with MailMerge fields and the
Merged document.
I've been through the VBA object model and the only
destination options appear to be:
1. wdSendToNewDocument
2. wdSendToFax
3. wdSendToEmail
4. wdSendToPrinter
So the question is, is there any way via VBA to force word
to merge the recipient list data into the first document
created by Word, that way only one document is produced
instead of two.
A big thank you in advance
Alex
I've created a mailmerge template for my work colleges
that when opened automatically runs the following code.
Sub autonew()
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub
However, end users being end users, they still aren't
satisfied, so I hope you guys can help.
Requirements:
The macro must run on Word 97, 2000, XP and 2003
The Full Recipient list will always be merged into the
document
Problem with Current Code:
Even though the current code does all the hard work for
them, they don't like the fact that it produces two
documents, The document with MailMerge fields and the
Merged document.
I've been through the VBA object model and the only
destination options appear to be:
1. wdSendToNewDocument
2. wdSendToFax
3. wdSendToEmail
4. wdSendToPrinter
So the question is, is there any way via VBA to force word
to merge the recipient list data into the first document
created by Word, that way only one document is produced
instead of two.
A big thank you in advance
Alex