Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi freinds
I am trying to automate the printing of an Excel document through .NET. I got that part working but I need to do some print setttings such as landscape setup when I am printing the Excel sheet and I could not figureout where to set that property If you can commnent on my mode and give suggestions that will be greatly helpful to me '-------BEGIN CODE--------- Tr Dim myExcel = CreateObject("Excel.Application" Dim myBook = myExcel.Workbooks.Open(Server.MapPath(fileName) Dim wshnetwork = CreateObject("WScript.Network" Dim printerpath As String = "\\Faxprint1\IT-HPCLJ8500 wshnetwork.AddWindowsPrinterConnection(printerpath wshnetwork.SetDefaultPrinter(printerpath myExcel.DisplayAlerts = Fals myExcel.FeatureInstall = Fals myBook.PrintOut( myBook.close( myBook = Nothin myExcel.Quit( myExcel = Nothin Catch ex As Exceptio 'Response.Write(ex.ToString End Tr '-------END CODE--------- Thanks Sai |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
All-in-one printing incompatibility with EXCEL in landscape mode | New Users to Excel | |||
half page extra blank in Landscape mode PRINTING | Excel Discussion (Misc queries) | |||
half page extra blank in Landscape mode PRINTING | Excel Discussion (Misc queries) | |||
Why can't I switch to landscape mode? | Excel Discussion (Misc queries) | |||
Changing to Landscape mode automatically | Excel Programming |