print to printer using visual basic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ozipos
    New Member
    • Mar 2008
    • 1

    print to printer using visual basic

    I am trying to print text to a docket printer with the following command
    printer.print "trying to print"
    but I keep getting an error.
    Actually I want to print special keys so that the cah draw opens. I first need to know that the print commands work. If I can specify the printer as well it would be great.
    I have tried
    pinter.print Chr$(27);Chr$(0 );Char$(80);Chr $(80)
    but this doesnt work in opening the draw. The printer doesn't respond at all.
    The error I get is
    The expression on Click you entered as the event property setting produced the following error:
    Object doesn't support this property or method.
    Any help would be welcome.
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    Moved to the VB Forums where the resident experts can better assist you.

    **Moved from Programming Challenges.

    Comment

    • mrameshchandra
      New Member
      • Jan 2009
      • 1

      #3
      VB6 Printer.Print method returning run-time error 438

      Hi,

      I have a simple VB6 code here.

      Set prn = Printers(0)
      Debug.Print prn.DeviceName
      prn.Print "Hello" ' I am getting Run-time error 438 here. Object doesn't support this property or method.

      Can you please help with this? I am struggling on this for many hours.

      Thanks and regards
      rcm

      Comment

      Working...