C
Curt
when macro runs all is ok. If you cancel print then it goes back to vba.
Looking for a way to close merge document if user cancels print
Here is what I've got
It hangs on execute pause:
Thanks fo help I'm stumped
Sub maile()
' maile Macro
' Macro recorded 8/14/2007 by Curtiss A. Greer
ChangeFileOpenDirectory "\Parade\"
Documents.Open FileName:="ThankMailE.doc", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False (this is where it hangs up have used true also)
End With
End Sub
Looking for a way to close merge document if user cancels print
Here is what I've got
It hangs on execute pause:
Thanks fo help I'm stumped
Sub maile()
' maile Macro
' Macro recorded 8/14/2007 by Curtiss A. Greer
ChangeFileOpenDirectory "\Parade\"
Documents.Open FileName:="ThankMailE.doc", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False (this is where it hangs up have used true also)
End With
End Sub