>WITH ThisForm > *** Save the default printer > .cDefaultprinter = SET( 'PRINTER', 2 ) > *** Set the combo up to point at the current default printer > .cboPrinters.ListIndex = ASCAN( .cboPrinters.aContents, .cDefaultPrinter, -1, -1, 1, 15 ) > *** Create the WScript.Network object > .oNet = CREATEOBJECT( 'WScript.Network' ) >ENDWITH >>
>*** Get the installed printers into the combo box >APRINTERS( This.aContents ) >This.Requery() >>
>*** set the default printer to the selected printer
>Thisform.oNet.SetDefaultPrinter( This.DisplayValue )
>
>
>Al that is left is to reset the printer to the original default printer after you print the report.
Marcia,
do I have Windows scripting host installed for that?
AgnesWords are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
Off
There is no place like [::1]