Shingo@5: Dim printer Shingo@4: Dim filein Shingo@4: Dim fileout Shingo@5: If WScript.Arguments.Count <> 3 then Shingo@4: WScript.quit Shingo@4: End If Shingo@5: printer = WScript.Arguments.item(0) Shingo@5: filein = WScript.Arguments.item(1) Shingo@5: fileout = WScript.Arguments.item(2) Shingo@4: Shingo@4: Dim pptApp Shingo@4: Dim pptPres Shingo@4: Set pptApp = Wscript.CreateObject("PowerPoint.Application") Shingo@4: pptApp.Visible = True Shingo@4: Set pptPres = pptApp.Presentations.Open(filein) Shingo@4: Shingo@4: With pptPres.PrintOptions Shingo@4: .RangeType = ppPrintAll Shingo@4: .NumberOfCopies = 1 Shingo@4: .PrintHiddenSlides = msoTrue Shingo@4: .PrintColorType = ppPrintColor Shingo@4: .FitToPage = msoFalse Shingo@4: .FrameSlides = msoFalse Shingo@5: .ActivePrinter = printer Shingo@4: .PrintInBackground = False Shingo@4: End With Shingo@4: pptPres.PrintOut , , fileout Shingo@4: Shingo@4: Dim i Shingo@4: Dim note Shingo@4: For i = 1 To pptPres.Slides.Count Shingo@4: Wscript.StdErr.Write "Processing slide " & i & "... " Shingo@4: note = pptPres.Slides(i).NotesPage.Shapes(2).TextFrame.TextRange Shingo@4: WScript.StdOut.WriteLine note Shingo@4: WScript.StdOut.WriteLine Chr(12) Shingo@4: If InStr(note, "@file=") > 0 Then Shingo@4: pptPres.Slides(i).Export filein & ".tmp_slide" & i & ".png", "PNG" Shingo@4: End If Shingo@4: Wscript.StdErr.WriteLine "done" Shingo@4: Next Shingo@4: Shingo@4: pptPres.Close Shingo@4: