Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
kbgrunt
 
Posts: n/a
Default how can I print and close document and window from macro

I run the script below (thanks Jay Freedman) from a batch file to open an
ASCII text file, and compress 136 column report to print on letter size paper.

Can I print, close the document and window so user does nothing but click on
batch file?

Public Sub SetupReport()
Documents.Open "C:\docs\wide.txt"
ActiveDocument.PageSetup.Orientation = wdOrientLandscape
With ActiveDocument.Range
.Font.Name = "Courier New"
.Font.Size = 7
End With
End Sub

Thanks
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! I'm getting error messages too much-can't open Resume Wizard LizLB Microsoft Word Help 0 May 3rd 05 01:46 AM
Where did "print blank lines" option go in Office 2003??? Emily @ Siemons Mailmerge 1 April 26th 05 06:35 PM
Templates gman Page Layout 17 April 22nd 05 06:35 PM
No changes, but asks to save changes Vince Microsoft Word Help 3 April 11th 05 11:09 PM


All times are GMT +1. The time now is 05:50 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"