Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 97 blank pages printed

Status
Not open for further replies.

JillT

Programmer
Oct 29, 2001
13
GB
This is the click event of a command button on a user form, PrintPage which refers to checkboxes (each named Section#)to print selected sections of a document. It works fine except I get a blank page after some of the printouts. I added MoveLeft to reduce the selection but it makes no difference. Any ideas?

For Each ctrl In PrintPage.Controls
If Left(ctrl.Name, 7) = "Section" Then
If ctrl.Value = True Then
n = CInt(Right(ctrl.Name, Len(ctrl.Name) - 7))
ActiveDocument.Sections(n).Range.Select
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
ActiveDocument.PrintOut Range:=wdPrintSelection
End If
Selection.HomeKey Unit:=wdStory
End If
Next ctrl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top