.ActiveWorkBook.WorkSheets(m.iTabor).Activate cDestinationFName= cHTML+ALLTRIM(JUSTSTEM(laFileListWS [ifw,1]))+" "+.ActiveWorkBook.ActiveSheet.Name+'.pdf' *___ Use for testing cDestinationFName= "C:\TEMP\"+ALLTRIM(JUSTSTEM(laFileListWS [ifw,1]))+" "+.ActiveWorkBook.ActiveSheet.Name+'.pdf' *___ Individual PC's may have different PORT designations - Run Excel Macro to determine PORT * The result of printing to PDF995 is \\koshfp01\KChart\HTML\HTML_PDF.pdf (pdf995edit.exe) * Delay required for PDF generation and Delete PARAMETERS lNotPrintedFlag, nPort FOR nTryPort = 0 TO 20 IF FindPortAndPrint(.T.,nTryPort) && NotPrinted=T & Port=0 Ret= T/F EXIT ENDIF ENDFOR && Exit after excessive attempts ON ERROR DO LEAVEIT With Message( ) DO WaitingForCompletePDF *... Function FindPortAndPrint && Try Ne00: thru Ne20: PARAMETERS lPrintedFlag, nPort ON ERROR Do ForceBlank IF nPort > 20 gLogMESS= "* PDF995 Printer Port canNOT be FOUND (This cannot happen)! " DO WriteLog RETURN .T. ENDIF cPort= "Ne"+PADL(nPort,2,"0")+":" gLogMESS= " TRY Port Selection: "+ cPort Do WriteLog ON ERROR Return .F. && Try Again .ActivePrinter = "PDF995 on "+cPort IF lPrintedFlag .ActiveWorkbook.WorkSheets(m.iTabor).PrintOut && Creates cOriginalFName RETURN .T. && Print only once ENDIF RETURN .F.