selecting a printer in word object using vb6

I am new at writing code for a word object. I can make a document print, but i need to select a printer first and not use the default printer



thanks


Comments

  • : I am new at writing code for a word object. I can make a document print, but i need to select a printer first and not use the default printer

    :

    : thanks

    :

    The following two examples show how to set the active printer through code for either network or local.

    This example makes a network HP LaserJet IIISi printer the active printer.



    ActivePrinter = "HP LaserJet IIISi on \printerslaser"

    This example makes a local HP LaserJet 4 printer on LPT1 the active printer.



    ActivePrinter = "HP LaserJet 4 local on LPT1:"

    If you need to choose the printer right before printing add the following line of code to your macro:



    Dialogs(wdDialogFilePrint).Show

    This will open the Print dialog box.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories