'Print the document to PDF lTotlSheets = iShts - 1 For lSheet = 1 To iShts - 1 On Error Resume Next 'To deal with chart sheets If Not IsEmpty(Wbk.Sheets(lSheet).UsedRange) Then Wbk.Sheets(lSheet).PrintOut copies:=1, ActivePrinter:="PDFCreator"
'<-- Code added to check if sheet has entered queue before moving on 'Wait until job has entered PDF queue Do Until pdfjob.cCountOfPrintjobs = lSheet DoEvents Loop '-- Code modification ends -->
Else lTotlSheets = lTotlSheets - 1 End If On Error GoTo EarlyExit Next lSheet
Have software that produces a report over 3 or sometimes more pages - the first & second pages are not wanted. With the page order being mixed up and the all items having the same name this is difficult - would have to save all pages & delete the unwanted pages.
100's of these repoert are produced per month so this would be time wasting !