Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Printing
Message
 
 
À
27/02/2009 09:59:26
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01384528
Message ID:
01384546
Vues:
54
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform