Well, it was a quick and dirty solution. I'm presently reworking the code, but I'm still encountering problems.
>Russell,
>
>I'm not an expert on TS, but I think your CATCH code is dangerous in that it does not handle the case where a user cancels the GETPRINTER() dialog (returning '') or where your 2nd SET PRINTER command throws its own error.
>
>I would try wrapping your CATCH code in its own nested TRY/CATCH. My changes in lowercase. Untested.
>
>
>TRY
> SET PRINTER TO NAME (PrinterName)
>CATCH
> try
> local lcPrinter
> lcPrinter = GETPRINTER()
> if not empty( lcPrinter )
> set printer to (lcPrinter)
> endif
> catch
> messagebox( "Problem with printer selection ...", ... )
> endtry
>ENDTRY
>
>
>Malcolm