I Need Some Help with the PrintOut2 command used in The SW2007 API.
Basically What is happening is That I open a Drawing Document and then try to go through the Sheets and Only print the Sheets that dont have specific words in their names.
But for some unknown reason if the drawing has 2 sheets.. (Sheet1) + (PROFILE) They Both Print!??
Here is the basics of the Code that I used (From the API Help).
For iSheet = 0 To iSheetS
bPrintT = True
If InStr(1, UCase$(vSheets(iSheet)), "LASER") > 0 Then
If IncLASER = False Then
bPrintT = False
End If
End If
If InStr(1, UCase$(vSheets(iSheet)), "WATER") > 0 Then
If IncWATER = False Then
bPrintT = False
End If
End If
If InStr(1, UCase$(vSheets(iSheet)), "PROFILE") > 0 Then
If IncPROFILE = False Then
bPrintT = False
End If
End If
If bPrintT = True Then
swDrawing.ActivateSheet (vSheets(iSheet))
DoEvents
nPrintSheet(0) = iSheet + 1 vPrintSheets = nPrintSheet
swModelExt.PrintOut2 (vPrintSheets), icopies, False, stPrinter, ""
End If
Next