2 entries, 1 page |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
' Datei: PrintAllWorksheets.vbs
' VBSkript zum drucken aller Worksheets
Dim ag
Set ag=Wscript.Arguments
Dim fso
Dim File
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.GetFile(Ag(0))
Set objXL = WScript.CreateObject("Excel.Application")
With objXL
.Visible = True
.Workbooks.Open (file)
'.Sheets(Array(1, 2, 3)).Select
.Sheets.Select
.Sheets.PrintPreview
.Workbooks.Close
.Quit
End With
Msgbox "Job erledigt!"
1
2
3
4
5
6
7
8
9
10
11
12
13
' Datei: PrintAllWorksheets.vbs
' VBSkript zum drucken aller Worksheets
Set objXL = WScript.CreateObject("Excel.Application")
With objXL
.Visible = True
.Workbooks.Open ("c:\Eigene Dateien\mappe1.xls")
.Sheets(Array("Tabelle1", "Tabelle2", "Tabelle3")).Select
.Sheets.PrintPreview
.Workbooks.Close
.Quit
End With
Msgbox "Job erledigt!"
2 entries, 1 page |