Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Printing
Message
 
 
To
27/02/2009 09:59:26
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01384528
Message ID:
01384546
Views:
55
>Hi,
>
>I am generating word documents through VFP. I want to print the word file on a printer which is not the default printer on the server.
>
>Is there anyone who has tried this thing.
>
>Many thanks in advance,
>Abhi

We have this code in our MailMerge procedure
with loWord
   		.APPLICATION.Options.PrintBackground = .F.
*-- get current active printer
		lcActivePrinter = .APPLICATION.ActivePrinter
*--  set active printer
		IF VARTYPE(tcPrinter) = 'C'
			.ActivePrinter = tcPrinter
		ENDIF
   .APPLICATION.ActiveDocument.PrintOut()
  ** More code
endwith
Don't forget to restore the printer back.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform