SET PRINTER TO '&aMyPrinters[nPDF, 1]'Also, be sure the printer-specific information is removed from the report definition.
USE MyReport.frx GOTO TOP REPLACE tag WITH '', tag2 WITH '' USE>I'm having a problem changing the Windows default printer.
> =APRINTERS(aMyPrinters) > > FOR n=1 TO ALEN(aMyPrinters, 1) > IF "DocuCom PDF Driver" $ aMyPrinters[n, 1] > nPDF = n > ENDIF > ENDFOR > > IF nPDF = 0 > MessageBox("no PDF printer found, can't create the PDF report, will print normal instead.") > ELSE > SET PRINTER TO aMyPrinters[nPDF, 1] > ENDIF >>The program recognizes that the "DocuCom PDF Driver" is there and the VFP printer is set to it but when I print my printout still goes to the HP which is set as my Windows default printer. I need to go to the "DocuCom PDF Driver" to create my PDF....but that's not happening.