Thread: runnung word
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Curt Curt is offline
external usenet poster
 
Posts: 469
Default runnung word

Built a macro in word it works fine. When I copied it to Excel it runs until
the point of merge then stops. If you click on merge it will continue. Would
like to have it go thru the merge and stop when it hits printer. Others can
input ok for printer. Following is code that stops when hitting merge. Any
one with an idea I an frustrated. Thanks

Selection.TypeParagraph
Selection.TypeParagraph
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM C:\Parade\mailEcopy.xls WHERE ((Contact_Person IS NOT
NULL ))" _
& ""
With ActiveDocument.MailMerge ----------------------
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = False
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True