>>>Hi,
>>>I have a printer on a Terminal services client installed in Windows Server 2003. I can print to it thru the regular Windows print command (File menu, then Print).
>>>However, when I try to set the printer in Foxpro, using SET PRINTER TO NAME //Servername/printername, it hangs for a few seconds and then returns an error msg "Error accessing printer spooler".
>>>FYI, I already set sharing permissions on the server's Windows/system32/spool directory, and I turned off all client firewalls (remember I can print when using the menu: File/Print command in any programs, including VFP). However, I need to code the printer selection without the user selecting.
>>>
>>>Can anyone help?
>>>Thanks,
>>>Allen
>>
>>If it prints correctly from VFP itself, then probably you have 'dirty' frx file. Make sure that Tag,Tag2 fields are empty, and Expr field doesn't have printer specific data.
>
>Hi Ed,
>Good to hear from you again.
>I'm not printing a report file. I am only trying the command SET PRINTER TO NAME ... in the command window. This will give an error. If I click the File menu, then Print in VFP or any other program, it works.
>I think it's a setting for Terminal Services that I'm unsure of. I don't know if Terminal Services allows direct access to the print spooler.
>Thanks,
>Allen
What if you try: SET PRINTER TO GETPRINTER()
Edward Pikman
Independent Consultant