>>Have you try AddPrinterConnection and RemovePrinterConnection of WScript.Network object.
>
>I am having trouble using the WScript.Network object.
>
>Here is my code:
>oWshNetwork = CreateObject("WScript.Network")
>owshnetwork.AddWindowsPrinterConnection("\\myServer\myPrinter")
>
>I also tried:
>oWshNetwork = CreateObject("WScript.Network")
>owshnetwork.AddPrinterConnection("ColorPrinter","\\myServer\myPrinter")
>
>(I am using VFP7 and W2K)
>
>I get a different error message for the two examples.
>
>If anyone could help me with some code samples or hints that would be great.
>
>Thanks,
Look at the series of articles that Ed Rauh and I wrote on the WSH. The network object article appeared in the December, 2000 issue of the VFUG newsletter. The articles, which began in September that year, are available on-line at the site (
www.vfug.org).
>Einar
George
Ubi caritas et amor, deus ibi est