Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a printer
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00545890
Message ID:
00549643
Views:
15
Ok...found the article

READ the article.
Understand the article.

One problem tho', when I go to set the default printer using oNet.SetDefaultPrinter, it wants a printer name. The printer that I need to set as default printer does not exist on the workstation. I need to create the printer connection, set it as default, use it within the application and the get rid of it when the application is closed.

I'd rather not have to create the printer on each individual workstation, mostly because of that whole 'when Novell goes to print, it wants to log onto ALL the printers' thing.

Mayhaps I'm trying to do something that really can't be done, and if I have to create the printed on every workstation, I will....but I really don't want to and I'm hoping I'm just missing something real obvious





>>George
>>
>>I apologize, but I guess a year's worth of WAY too much work is taking it's toll. I can't seem to find that article that you speak of. Could I get some more explicit directions to it?
>>
>>Thanks
>>
>>
>>>>I need to be able to set a printed as the default printer on the fly from a VFP application. I need to be able to (for want of better phrases) 1) capture a printer port to a completely different network print queue, 2) send the print, and 3) reset the printer back to the original
>>>>
>>>>Here's the problems, as I see them
>>>>
>>>>1. This printer/print queue will probably not exist on the individual workstations, and
>>>>
>>>>2. This needs to be local to the VFP app
>>>>
>>>>
>>>>This is all running on a Novell 4.11+ network
>>>>
>>>>And, of course, I'm on a short timeline with this so ANY help would be appreciated
>>>
>>>Dorris,
>>>
>>>First, getting the default printer can be done via the SET("PRINTER", 2) function call. I'd use this will APRINTERS() to get the port.
>>>
>>>Setting the default printer can be done, if it's available, via the Windows Script Host's WScript.Network object's SetDefaultPrinter() method. See the fourth in the five part series of articles on using the WSH from within VFP that appeared in the VFUG (www.vfug.org) newsletter. The articles are available on-line at the site. This information can be found in last December's issue.
>
>It's a bit difficult. I can't give you a URL, only directions. Once you've entered the VFUG site past the login, the second item on the left says VFUG Newsletters. It's directly below VFUG Support Forum. Click the link. You'll get a list of the newsletters, the most recent being at the top. Scroll down until you see December 2000 -- New Browser Instance. Click either that or Same Frame View to the right. It's the fifth article listed.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform