1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

VB script in Word for Printing

Discussion in 'Visual Basic ( VB )' started by claudia, May 23, 2006.

  1. claudia

    claudia New Member

    I have put a script in Word to print to a certain printer each time. This printer in this example is a label printer.
    This is the following script

    Option Explicit
    Private sub Document Open()
    With Dialogs(wdDialogFilePrintSetup)
    .Printer = "labelprinter name"
    .DoNotSetAsSysDefault = True
    End With
    End Sub

    we are using remote desktop to a server and the label printer name shows listed on the server as sc_label on Desktop2. If I put that name in, the script doesn't work. This printer is not connect to a print server like the other printers but to a PC. I can use one of the printers that is on a print server and the script works fine. Any ideas?
  2. shabbir

    shabbir Administrator Staff Member

    I guess you are missing a point here.

    If you wish to use the printer of the server you need to either installed the share copy of the printer driver on your machine or access the printer through the name/ip as "\\<ipaddress>\<SharePrinterName>\". Correct me if I am wrong.
  3. claudia

    claudia New Member

    The printer is Listed on the server as "sc_label on FRONTDESK2" it is a USB printer on PC. The share name is "sc_label". When I look at the properties on the printer it shows the port to be USB001. I have tried doe "\\FRONTDESK2\sc_label" and that didn't work. And just "sc_label" and that didnt work. Any other ides? Thanks for the help Claudia
  4. shabbir

    shabbir Administrator Staff Member

    Why dont you install the same network printer object locally instead of accessing the printer on the network.

Share This Page