ASP - Excel - PrintOut method

Discussion in 'ASP General' started by Klefevre@techdata.be, Feb 17, 2004.

  1. Guest

    Hi,

    I was wondering why the code below does not work in ASP.
    Why does the printout method not work?

    Tx,
    Kurt

    Dim m_strPrinterDeviceName
    Dim m_objExcelApplication, m_objExcelWorkBook, m_objExcelWorkSheet
    Set m_objExcelApplication = Server.CreateObject("Excel.Application")
    Set m_objExcelWorkBook = m_objExcelApplication.Workbooks.Open("my path to Excel file goes here", , True)
    Set m_objExcelWorkSheet = m_objExcelWorkbook.Sheets("Excel")

    ' Print to fax server
    m_strPrinterDeviceName = "my printer goes here"
    m_objExcelWorkBook.PrintOut , , , , m_strPrinterDeviceName

    Set m_objExcelWorkSheet = Nothing
    m_objExcelWorkBook.Close False
    Set m_objExcelWorkBook = Nothing
    m_objExcelApplication.Quit
    Set m_objExcelApplication = Nothing
     
    , Feb 17, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TJS
    Replies:
    0
    Views:
    295
  2. Mike Grace

    Can I output a printout as a tif?

    Mike Grace, Aug 27, 2003, in forum: Java
    Replies:
    1
    Views:
    362
    Mike Grace
    Aug 27, 2003
  3. Bill Dennis

    Imbedding Word Files in Printout

    Bill Dennis, Dec 5, 2003, in forum: Java
    Replies:
    0
    Views:
    317
    Bill Dennis
    Dec 5, 2003
  4. Replies:
    3
    Views:
    522
    John C. Bollinger
    Mar 8, 2006
  5. Stefan Mueller
    Replies:
    4
    Views:
    1,489
    wayne
    Nov 26, 2005
Loading...

Share This Page