|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Print an Excel file in VBHave a previously created an Excel file and want to print on default printer.
Want to initiate printing from within my application. Thanks Hi Gavin-
1) Add a reference to Excel Object Library in .NET 2) Include (with Imports statments) Imports Excel = Microsoft.Office.Interop.Excel 'Reference: Excel Object Library" 3) Add (with Class member variable statements) Friend WithEvents exWB As Excel.Workbook Friend WithEvents exAPP As Excel.Application Friend WithEvents exWS As Excel.Worksheet 4) Open the excel file (using OpenFileDialog) exAPP.Workbooks.Open(ofd.FileName) 5) Use the PrintOut method for object you want to print. exApp.ActiveSheet.PrintOut John Show quoteHide quote "gavin" wrote: > Have a previously created an Excel file and want to print on default printer. > > Want to initiate printing from within my application. > > Thanks
Check result of call into Windows API
Multi-Threaded App Print ID card using Plastic Card Printer in VB.net Listview columnheader question Date and Time Calculation. Regex doesn't match when test string is in middle of file How Do I Create an Entry Point for a DLL? Winforms User COntrol Addhandler in a Multithreading class and the events raised in seperate threads, how to get to the ca blue mask over icon |
|||||||||||||||||||||||