Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP - Excel - PrintOut method

Thread Tools

ASP - Excel - PrintOut method
Posts: n/a

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


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
Set m_objExcelApplication = Nothing
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
TreeMap printout order Java 3 03-08-2006 05:14 AM
Imbedding Word Files in Printout Bill Dennis Java 0 12-05-2003 09:50 PM
updated exam printout Mark Scott MCSE 3 11-02-2003 02:18 PM
printout of object property settings TJS ASP .Net 0 10-17-2003 05:17 PM
Can I output a printout as a tif? Mike Grace Java 1 08-27-2003 05:55 PM