ASP - Excel - PrintOut method

K

Klefevre

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top