cancel print in macro

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dynamic Subject Line Email Merge 0
print cancel 1
earlier thread posted 5
mailmerge recorded macro 0
word data from excel 0
macro 2 issues 0
4198 debug 0
Close quit 1

Top