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. Advertisements

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:
    395
  2. Mike Grace

    Can I output a printout as a tif?

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

    Imbedding Word Files in Printout

    Bill Dennis, Dec 5, 2003, in forum: Java
    Replies:
    0
    Views:
    409
    Bill Dennis
    Dec 5, 2003
  4. Replies:
    3
    Views:
    652
    John C. Bollinger
    Mar 8, 2006
  5. Stefan Mueller
    Replies:
    4
    Views:
    1,767
    wayne
    Nov 26, 2005
  6. Geoff Jones

    printout of characters

    Geoff Jones, Jan 8, 2005, in forum: C++
    Replies:
    2
    Views:
    435
    Jerry Coffin
    Jan 8, 2005
  7. printout statements

    , Feb 8, 2005, in forum: C++
    Replies:
    5
    Views:
    556
    Thomas Matthews
    Feb 8, 2005
  8. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    2,006
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
Loading...