how can I print and close document and window from macro



kbgrunt
07-10-2005, 12:03 AM
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


how can I print and close document and window from macro