Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to set the Default Printer
Message
From
13/08/2010 10:56:01
 
 
To
13/08/2010 10:18:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00870520
Message ID:
01476473
Views:
272
This message has been marked as the solution to the initial question of the thread.
>It seems to be working if I close adobe and then set the windows system default printer.
>
>How do you suggest I accomplish this task?
>
> I need to print to a bullzip pdf printer first to create a pdf.
>Then, I need to switch to a selected printer to print a hard copy of the pdf.
>
>
>

Debra,

I have not followed the whole thread - but try this

- no need to change the default windows printer
- pass the printer name to ShellExecute as a parameter
	declare integer GetDesktopWindow IN win32api

	Declare long ShellExecute in shell32.dll  ;
		    long hwnd, ;
		    string lpszOp, ;
		    string lpszFile, ;
		    string lpszParams, ;
		    string lpszDir, ;
		    long nShowCmd
			    
	local pdfFile, printerName 
	pdfFile = 'd:\tmp\0xx.pdf'
	pdfFile = 'd:\tmp\aaa.pdf'
	
	printerName = 'HP Photosmart C6100 series'
	&& printerName = 'Bullzip PDF Printer'
	
	
	
	?ShellExecute(GetDesktopWindow(), 'printto', m.pdfFile, '"' + m.printerName + '"', null, 7)
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform