Results 1 to 1 of 1

Thread: Adding Networked Printer with WSH

  1. #1

    Thread Starter
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667

    Adding Networked Printer with WSH

    Hi having a problem adding a Printer using the WSH in Word.

    VB Code:
    1. objPrinters.AddPrinterConnection "2nd_label", "\\lvp-fap\2nd_flr7"

    I get the folloeing error

    Runtime Error -2147023696 (800704b0)
    Automation error The specifiied device name is invalid.
    But I can see the printer on the \lvp-fap\ server ad the name is correct can any one help!!!!

    Thanks



    Really confused now did some searching on t'internet and found this that works a treat

    VB Code:
    1. Dim net
    2. Set net = CreateObject("WScript.Network")
    3. net.AddWindowsPrinterConnection "\\lvp-fap\2nd_label"

    why does this work and not my original?????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width