equal
deleted
inserted
replaced
|
1 Dim printer |
|
2 Dim filein |
|
3 Dim fileout |
|
4 If WScript.Arguments.Count <> 3 then |
|
5 WScript.quit |
|
6 End If |
|
7 printer = WScript.Arguments.item(0) |
|
8 filein = WScript.Arguments.item(1) |
|
9 fileout = WScript.Arguments.item(2) |
|
10 |
|
11 Dim pptApp |
|
12 Dim pptPres |
|
13 Set pptApp = Wscript.CreateObject("PowerPoint.Application") |
|
14 pptApp.Visible = True |
|
15 Set pptPres = pptApp.Presentations.Open(filein) |
|
16 |
|
17 With pptPres.PrintOptions |
|
18 .RangeType = ppPrintAll |
|
19 .NumberOfCopies = 1 |
|
20 .PrintHiddenSlides = msoTrue |
|
21 .PrintColorType = ppPrintColor |
|
22 .FitToPage = msoFalse |
|
23 .FrameSlides = msoFalse |
|
24 .ActivePrinter = printer |
|
25 .PrintInBackground = False |
|
26 End With |
|
27 pptPres.PrintOut , , fileout |
|
28 |
|
29 Dim i |
|
30 Dim note |
|
31 For i = 1 To pptPres.Slides.Count |
|
32 Wscript.StdErr.Write "Processing slide " & i & "... " |
|
33 note = pptPres.Slides(i).NotesPage.Shapes(2).TextFrame.TextRange |
|
34 WScript.StdOut.WriteLine note |
|
35 WScript.StdOut.WriteLine Chr(12) |
|
36 If InStr(note, "@file=") > 0 Then |
|
37 pptPres.Slides(i).Export filein & ".tmp_slide" & i & ".png", "PNG" |
|
38 End If |
|
39 Wscript.StdErr.WriteLine "done" |
|
40 Next |
|
41 |
|
42 pptPres.Close |
|
43 |