C
Curt
Have the following macro do not understand when print screen shows check
pages 1-2 will not stop prints complete list. This was my object in having
print control. to get certain pages. Pages are taken from an excel sheet.
each row from excel is on its own page. Can anyone tell me where I went
wrong. Other times i've done this I have printer control This is first try
directly from an excel sheet Also if I ask for a certain page say 15 no print
Thanks
End With
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Name_of_Entry"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"CityState"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Description"
Selection.TypeParagraph
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `Announcer$` WHERE ((`Nbr` IS NOT NULL ) AND (`Name
of Entry` IS NOT NULL ) AND (`City&State` IS NOT NULL ) AND (`Description` IS
NOT NULL ))" _
& ""
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
Application.Quit SaveChanges:=wdDoNotSaveChanges
End With
ActiveWindow.Close
CommandBars("Stop Recording").Visible = False
End Sub
pages 1-2 will not stop prints complete list. This was my object in having
print control. to get certain pages. Pages are taken from an excel sheet.
each row from excel is on its own page. Can anyone tell me where I went
wrong. Other times i've done this I have printer control This is first try
directly from an excel sheet Also if I ask for a certain page say 15 no print
Thanks
End With
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Name_of_Entry"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"CityState"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Description"
Selection.TypeParagraph
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `Announcer$` WHERE ((`Nbr` IS NOT NULL ) AND (`Name
of Entry` IS NOT NULL ) AND (`City&State` IS NOT NULL ) AND (`Description` IS
NOT NULL ))" _
& ""
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
Application.Quit SaveChanges:=wdDoNotSaveChanges
End With
ActiveWindow.Close
CommandBars("Stop Recording").Visible = False
End Sub