>I have a routine that prints a Word document (from VFP application, of course). But it prints document to a default printer. The segment of the code that prints the document is as following:
>
>
> oDocument = oWord.Documents.Open( cFile2Attach )
> if type( "oDocument" ) = "O" and !isnull( oDocument )
> oDocument.PrintOut(.F.)
> oDocument.Close()
> endif
>
>
>Where in the above code I can specify where (printer name) to send this document? And what is the syntax?
>
>Thank you in advance for any help
Try:
#DEFINE wdDialogFilePrintSetup 97
lcPrinter = GETPRINTER()
oWord = CreateObject("Word.Application")
WITH oWord.Dialogs(wdDialogFilePrintSetup)
.Printer = lcPrinter
.DoNotSetAsSysDefault = .t.
.execute()
ENDWITH
Can't test it right now
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.