LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default command line script for printing MS Excel 2000 document.

Hi

There is one way - go to ThisWorkBook in VBE and paste the following
code

Private Sub Workbook_Open()

Range("$A$1:$M$30").PrintOut Copies:=1, Collate:=True
Application.DisplayAlerts = False
Application.Quit

End Sub

Change the range to suit your print area and then schedule a task to
open that Excel file. So when it opens it will print it then close it
(without saving).

This is untested code as I do not have printer at the moment. If you
want open the workbook without printing the code hold down Shift before
opening.

Tom
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 printing problem--printing 1 document on 2 pages Bons Excel Discussion (Misc queries) 0 December 24th 09 04:15 PM
Limited Page Printing problem; Blue Dashed Line Delineating End Of Document ? Robert11 New Users to Excel 1 November 18th 07 02:40 PM
command line Excel Script [email protected] Excel Discussion (Misc queries) 0 August 22nd 06 01:23 PM
Disabling Document AutoRecovery in Excel by script Sedgwick Excel Discussion (Misc queries) 4 July 21st 06 05:47 AM
Using Excel 2000 as Data source for Word 2000 document Malcolm Agingwell Excel Discussion (Misc queries) 2 June 21st 05 09:28 AM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"