Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Printer To Name in Vista
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Set Printer To Name in Vista
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01291635
Message ID:
01291635
Views:
65
I'm trying to get Amyuni PDF Converter to work in Vista.
The problem is with the SET PRINTER TO NAME command.

This code works in XP.

*********
this.opdf = CREATEOBJECT('cdintfex.cdintfex')

lnHandle = this.opdf.driverinit('SWI PDF Printer')
llReturn = this.opdf.enablePrinter(this.licensedto,this.activationcode)

set printer to name ('SWI PDF PRINTER')

lcOutputFile = ALLTRIM(thisform.cntgetfile1.eDTPATH.Value)
thisform.opdf.filenameoptions = noprompte+usefilename
thisform.opdf.defaultfilename = lcOutputFile
report form (thisform.cReportname) noeject noconsole to printer
thisform.opdf.filenameoptions = 0
**********

When I run the code in Vista, it still prints to the default printer.
If I set the Default printer to the SWI PDF Printer before running the application, it works.

I don't really want to switch the default printer for all of windows, just for this application.

Is there something special you need to do to switch the printer when running under Vista?

-Phil Sherwood
Phil Sherwood
SherWare, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform