Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the Windows default printer
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00606147
Message ID:
00606244
Views:
24
Try ...
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.
>I have an HP 4000 TN laser printer as my default printer.
>I have a PDF printer driver installed (it's name is "DocuCom PDF Driver").
>In my program I do the following:
>
>	=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.
>
>What am I doing wrong and what should I be doing instead?
>TIA,
>Rick Liebespach
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform