Thanks Borislav.
Gerard
>>I want to restore the setting of the default printer:My code goes like:
>>
>>1. Store Current Default printer ???
>>2. x=Set printer to name GetPrinter()
>>3. ......Do some Code
>>4. Restore Printer to its default ?//
>>
>>Anybody know the commands for Line 1 and 4
>>I tried x=Set('Printer') but this just returns On or Off
>>
>>Regards,
>>Gerard
>
>Check SET() function in HELP, the topic where PRINTER is parameter, it says:
>
>PRINTER - ON or OFF
>PRINTER, 1 - FileName or PortName
>PRINTER, 2 - Default Windows printer name
>PRINTER, 3 - Default Visual FoxPro printer name(specified in the Visual FoxPro Print or Print Setup dialog boxes)
>
>
>So you can use:
>
>lcWndPrtName = SET([PRINTER],2)
>lcVFPPrtName = SET([PRINTER],3)
>