Thread Excel soll alle Tabellen drucken: Windows-Skripting (1 answers)
Opened by Ronnie at 2003-12-11 12:27

Ronnie
 2003-12-11 12:27
#10595 #10595
User since
2003-08-14
2022 Artikel
BenutzerIn
[default_avatar]
Okay, die Lösung (ich hasse vb):

Code: (dl )
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!"

View full thread Excel soll alle Tabellen drucken: Windows-Skripting