Select printer in code

  • Hi,

    I am trying to direct print output to a specific printer using the following code.

    Code
    Me.WpdllInt1.SelectPrinter("\\37YKDDD\Canon MP730 Printer")
    Me.WpdllInt1.Memo.Print()

    However the output always goes to the default printer. In this case the required printer is a network printer. WpdllInt1 is a TextDynamic contol I have dragged onto a form and populated in code.

    Any help appreciated.

    Regards,

    Geoff

  • Hi,

    That would be great.

    Does

    Code
    Me.WpdllInt1.Memo.PrintParameter.AllPagePaperSource = My.Settings.LpBinItem


    work. That would be nice but I dont have a multi-bin printer to test it on.

    Regards,

    Geoff

  • Just thinking a bit more about selecting different bins or print quality on a printer, one solution is to create virtual printers. I have to print drug scripts, letters, pathology requests etc and they need different resolutions (good for letters, draft for scripts for speed) and different bins. I was going to select the bin using

    Code
    Me.WpdllInt1.Memo.PrintParameter.AllPagePaperSource=x

    but it would be better to ad a virtual printer using Control Panel's Add Printer Wizard, renaming it and changing the properties to what I want. Then multiple virtual printers could all point to the same physical printer but I could specify the full range of options using the properties of printer section.

    e.g. names could be CanonDraft, CanonQuality, CanonAutoFeed, CanonBottomBin.

    Then all you need to do is select the appropriate printer with

    Code
    Me.WpdllInt1.SelectPrinter("CanonDraft")