Printers of the system in autocad 2000

Discussion in 'AutoCAD' started by Orlando Toral, Aug 23, 2004.

  1. Since it might obtain the list of printers of the system using VBA and
    knowing which is predetermined on Windows?

    It is possible that printers are in remote computers, can they appear also?

    Thanks.
     
    Orlando Toral, Aug 23, 2004
    #1
  2. Orlando Toral

    bcoward Guest

    Yes, but you will have to deal with issues regarding cross-boundaries, security, and Printer/file sharing.

    Good luck,

    Bob Coward
    CADS, Inc

    800-366-0946
     
    bcoward, Aug 23, 2004
    #2
  3. Nathan Taylor, Aug 24, 2004
    #3
  4. Orlando Toral

    Nathan Guill Guest

    Nathan Guill, Dec 13, 2004
    #4
  5. Orlando Toral

    MP Guest

    MP, Dec 13, 2004
    #5
  6. That is the site I use the most but it is missing GetDefaultPrinter & SetDefaultPrinter. It does have EnumPrinters though including an example. Here is a snippet of my code using GetDefaultPrinter & SetDefaultPrinter to temporarily change the default printer:
    Code:
    Option Explicit
    Private Declare Function GetDefaultPrinter Lib "winspool.drv" Alias "GetDefaultPrinterA" (ByVal pszBuffer As String, pcchBuffer As Long) As Long
    Private Declare Function SetDefaultPrinter Lib "winspool.drv" Alias "SetDefaultPrinterA" (ByVal pszPrinter As String) As Long
    
    Private Sub PrinterExample()
    Dim pszBuffer As String
    pszBuffer = Space(100)
    Call GetDefaultPrinter(pszBuffer, 100)
    Call SetDefaultPrinter("\\IRIS\Mapping RICOH Aficio CL7000 PS")
    
    Call SetDefaultPrinter(pszBuffer)
    End Sub
    
    Regards - Nathan
     
    Nathan Taylor, Dec 14, 2004
    #6
  7. Orlando Toral

    MP Guest

    Thanks Nathan,
    I copied your code to the "Notes" section of my copy of apiGuide under
    EnumPrinters
    I also noticed under File menu there is a Submit Example item should you
    wish to become famous!
    :)
    Mark
     
    MP, Dec 14, 2004
    #7
  8. Orlando Toral

    Nathan Guill Guest

    Nathan Guill, Dec 14, 2004
    #8
  9. Orlando Toral

    Nathan Guill Guest

    Thanks. This helps a LOT.

    SetDefaultPrinter. It does have EnumPrinters though including an example.
    Here is a snippet of my code using GetDefaultPrinter & SetDefaultPrinter to
    temporarily change the default printer:
     
    Nathan Guill, Dec 14, 2004
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.