I have a large Word XP document with lots of section breaks. I have created a Print userform that allows users to choose a portion of the document to print. Those portions correspond to section breaks in the documents. When the user selects a portion to print I send a print command to print the section or sections. When the document prints, the first page of the section does not print. Here is the code I'm using. Sorry it is so long. How do I get the first page of the section to print?
Private Sub butOK_Click()
ufPrint.hide
Select Case True
Case optEntire.Value = True
PrintSections wdPrintAllDocument, ""
Case optCurPg.Value = True
PrintSections wdPrintCurrentPage, ""
Case optPart1.Value = True
PrintSections wdPrintRangeOfPages, "S1"
Case optPart2.Value = True
PrintSections wdPrintRangeOfPages, "S2-S4"
Case optCrisisTeam.Value = True
PrintSections wdPrintRangeOfPages, "S4"
Case optAnnexA.Value = True 'Staff Information
PrintSections wdPrintRangeOfPages, "S5-S8"
Case optAnnexB.Value = True 'Student Information
PrintSections wdPrintRangeOfPages, "S9-S11"
Case optAnnexC.Value = True 'Emergency Services
PrintSections wdPrintRangeOfPages, "S12"
Case optAnnexD.Value = True 'Communications
PrintSections wdPrintRangeOfPages, "S13"
Case optAnnexE.Value = True 'Command Posts
PrintSections wdPrintRangeOfPages, "S14"
Case optAnnexF.Value = True 'Evacuation
PrintSections wdPrintRangeOfPages, "S15"
Case optAnnexG.Value = True 'Shelter In Place
PrintSections wdPrintRangeOfPages, "S16"
Case optAnnexH.Value = True 'Lockdown
PrintSections wdPrintRangeOfPages, "S17"
Case optAnnexI.Value = True 'Health & Medical
PrintSections wdPrintRangeOfPages, "S18"
Case optAnnexJ.Value = True 'Security
PrintSections wdPrintRangeOfPages, "S19"
Case optAnnexK.Value = True 'Transportation
PrintSections wdPrintRangeOfPages, "S20"
Case optXportFlipChart.Value = True 'Transportation
CreateFCTables
MsgBox "Print Flip Chart ""Single-sided""", vbOKOnly, "Special Printing Instructions"
PrintSections wdPrintRangeOfPages, "S21-S31"
Case optAnnexL.Value = True 'Utilities & Facility Data
PrintSections wdPrintRangeOfPages, "S32"
Case optAnnexM.Value = True 'Media
PrintSections wdPrintRangeOfPages, "S33"
Case optAnnexN.Value = True 'Threat Assessment
PrintSections wdPrintRangeOfPages, "S34"
Case optAnnexO.Value = True 'Other Facility Functions
PrintSections wdPrintRangeOfPages, "S35"
Case optAnnexT.Value = True 'Off Site Events
PrintSections wdPrintRangeOfPages, "S36-S40"
Case optAnnexS.Value = True 'Training and Drills
PrintSections wdPrintRangeOfPages, "S41"
Case optAnnexR.Value = True 'Recovery
PrintSections wdPrintRangeOfPages, "S42"
Case optPhyDescSheet.Value = True 'Physical Description Sheet
PrintSections wdPrintRangeOfPages, "P" & PDSPage & "S17"
Case optFlipChart.Value = True 'Flip Chart
CreateFCTables
MsgBox "Print Flip Chart ""Single-sided""", vbOKOnly, "Special Printing Instructions"
PrintSections wdPrintRangeOfPages, "S43-S53"
Case optSearchForm.Value = True 'Search Sheet
PrintSections wdPrintRangeOfPages, "S54"
Case optStagingForm.Value = True 'Staging Areas
PrintSections wdPrintRangeOfPages, "S55"
Case optParentalReunionForm.Value = True 'Parental Reunification
PrintSections wdPrintRangeOfPages, "S56"
Case optSpecialNeedStudentForm.Value = True 'Students With Special Needs
PrintSections wdPrintRangeOfPages, "S10"
Case optSpecialNeedStaffForm.Value = True 'Staff With Special Needs
PrintSections wdPrintRangeOfPages, "S8"
Case optOffSiteTripForm.Value = True 'Off Site Trip
PrintSections wdPrintRangeOfPages, "S37"
Case optOffSiteEventRoster.Value = True 'Off Site Event Roster
PrintSections wdPrintRangeOfPages, "S39"
Case optIncMgmtForm.Value = True
PrintSections wdPrintRangeOfPages, "S3,S6"
Case optStudentAccountForm.Value = True 'Student Accountability
PrintSections wdPrintRangeOfPages, "S57"
Case optMemoUnderstandForm.Value = True
PrintSections wdPrintRangeOfPages, "S58"
Case optMutualAidForm.Value = True
PrintSections wdPrintRangeOfPages, "S59"
End Select
Unload ufPrint
End Sub
Public Sub PrintSections(ByVal Rng As Variant, Pgs As String)
Dim dlgPrint As Dialog
Set dlgPrint = Dialogs(wdDialogFilePrint)
With dlgPrint
.Range = Rng
.Pages = Pgs
End With
ProtectForm
dlgPrint.Show
End Sub
Private Sub butOK_Click()
ufPrint.hide
Select Case True
Case optEntire.Value = True
PrintSections wdPrintAllDocument, ""
Case optCurPg.Value = True
PrintSections wdPrintCurrentPage, ""
Case optPart1.Value = True
PrintSections wdPrintRangeOfPages, "S1"
Case optPart2.Value = True
PrintSections wdPrintRangeOfPages, "S2-S4"
Case optCrisisTeam.Value = True
PrintSections wdPrintRangeOfPages, "S4"
Case optAnnexA.Value = True 'Staff Information
PrintSections wdPrintRangeOfPages, "S5-S8"
Case optAnnexB.Value = True 'Student Information
PrintSections wdPrintRangeOfPages, "S9-S11"
Case optAnnexC.Value = True 'Emergency Services
PrintSections wdPrintRangeOfPages, "S12"
Case optAnnexD.Value = True 'Communications
PrintSections wdPrintRangeOfPages, "S13"
Case optAnnexE.Value = True 'Command Posts
PrintSections wdPrintRangeOfPages, "S14"
Case optAnnexF.Value = True 'Evacuation
PrintSections wdPrintRangeOfPages, "S15"
Case optAnnexG.Value = True 'Shelter In Place
PrintSections wdPrintRangeOfPages, "S16"
Case optAnnexH.Value = True 'Lockdown
PrintSections wdPrintRangeOfPages, "S17"
Case optAnnexI.Value = True 'Health & Medical
PrintSections wdPrintRangeOfPages, "S18"
Case optAnnexJ.Value = True 'Security
PrintSections wdPrintRangeOfPages, "S19"
Case optAnnexK.Value = True 'Transportation
PrintSections wdPrintRangeOfPages, "S20"
Case optXportFlipChart.Value = True 'Transportation
CreateFCTables
MsgBox "Print Flip Chart ""Single-sided""", vbOKOnly, "Special Printing Instructions"
PrintSections wdPrintRangeOfPages, "S21-S31"
Case optAnnexL.Value = True 'Utilities & Facility Data
PrintSections wdPrintRangeOfPages, "S32"
Case optAnnexM.Value = True 'Media
PrintSections wdPrintRangeOfPages, "S33"
Case optAnnexN.Value = True 'Threat Assessment
PrintSections wdPrintRangeOfPages, "S34"
Case optAnnexO.Value = True 'Other Facility Functions
PrintSections wdPrintRangeOfPages, "S35"
Case optAnnexT.Value = True 'Off Site Events
PrintSections wdPrintRangeOfPages, "S36-S40"
Case optAnnexS.Value = True 'Training and Drills
PrintSections wdPrintRangeOfPages, "S41"
Case optAnnexR.Value = True 'Recovery
PrintSections wdPrintRangeOfPages, "S42"
Case optPhyDescSheet.Value = True 'Physical Description Sheet
PrintSections wdPrintRangeOfPages, "P" & PDSPage & "S17"
Case optFlipChart.Value = True 'Flip Chart
CreateFCTables
MsgBox "Print Flip Chart ""Single-sided""", vbOKOnly, "Special Printing Instructions"
PrintSections wdPrintRangeOfPages, "S43-S53"
Case optSearchForm.Value = True 'Search Sheet
PrintSections wdPrintRangeOfPages, "S54"
Case optStagingForm.Value = True 'Staging Areas
PrintSections wdPrintRangeOfPages, "S55"
Case optParentalReunionForm.Value = True 'Parental Reunification
PrintSections wdPrintRangeOfPages, "S56"
Case optSpecialNeedStudentForm.Value = True 'Students With Special Needs
PrintSections wdPrintRangeOfPages, "S10"
Case optSpecialNeedStaffForm.Value = True 'Staff With Special Needs
PrintSections wdPrintRangeOfPages, "S8"
Case optOffSiteTripForm.Value = True 'Off Site Trip
PrintSections wdPrintRangeOfPages, "S37"
Case optOffSiteEventRoster.Value = True 'Off Site Event Roster
PrintSections wdPrintRangeOfPages, "S39"
Case optIncMgmtForm.Value = True
PrintSections wdPrintRangeOfPages, "S3,S6"
Case optStudentAccountForm.Value = True 'Student Accountability
PrintSections wdPrintRangeOfPages, "S57"
Case optMemoUnderstandForm.Value = True
PrintSections wdPrintRangeOfPages, "S58"
Case optMutualAidForm.Value = True
PrintSections wdPrintRangeOfPages, "S59"
End Select
Unload ufPrint
End Sub
Public Sub PrintSections(ByVal Rng As Variant, Pgs As String)
Dim dlgPrint As Dialog
Set dlgPrint = Dialogs(wdDialogFilePrint)
With dlgPrint
.Range = Rng
.Pages = Pgs
End With
ProtectForm
dlgPrint.Show
End Sub