C
Curt
Have the following code works great when print canceled. Now when you check 1
in print dialog screen. It merges all records. but before it does it displays
error 5535 could not finish mergeing or inserting database. debug came up on
..Execute Pause cannot remove or no merge.
Can anyone see what I can't Stumped at this point.
Thanks
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
'.Destination = wdSendToPrinter
With Dialogs(wdDialogFilePrint)
If .Show <> -1 Then
Application.Quit SaveChanges:=wdDoNotSaveChanges
Exit Sub
'ActiveDocument.PrintOut Background:=False
' ActiveDocument.Close wdDoNotSaveChanges
' Application.Quit SaveChanges:=wdDoNotSaveChanges
' Exit Sub
'Application.Quit SaveChanges:=wdDoNotSaveChanges
End If
End With
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = False
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
Application.Quit SaveChanges:=wdDoNotSaveChanges
End Sub
in print dialog screen. It merges all records. but before it does it displays
error 5535 could not finish mergeing or inserting database. debug came up on
..Execute Pause cannot remove or no merge.
Can anyone see what I can't Stumped at this point.
Thanks
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
'.Destination = wdSendToPrinter
With Dialogs(wdDialogFilePrint)
If .Show <> -1 Then
Application.Quit SaveChanges:=wdDoNotSaveChanges
Exit Sub
'ActiveDocument.PrintOut Background:=False
' ActiveDocument.Close wdDoNotSaveChanges
' Application.Quit SaveChanges:=wdDoNotSaveChanges
' Exit Sub
'Application.Quit SaveChanges:=wdDoNotSaveChanges
End If
End With
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = False
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
Application.Quit SaveChanges:=wdDoNotSaveChanges
End Sub