Jump to content

Gast376

Abgemeldet
  • Gesamte Inhalte

    2
  • Registriert seit

  • Letzter Besuch

Reputation in der Community

0 Neutral

Letzte Besucher des Profils

316 Profilaufrufe
  1. Gast376

    Bitte löscht meinen Account

    Hey, bitte löscht meinen Account - Danke!
  2. Hi Mamamia, es lag tatsächlich an den fehlenden Klammern hinter dem ".Delete" Vielen Dank für deine Antwort!
  3. Hallo zusammen, ich bin neu im Powershell-Umfeld, aber habe schon eine kleine Aufgabe für mich gefunden... leider stecke ich auch schon fest. :confused: Ziel: Ich möchte gerne alle Folien, außer einem gewissen Bereich (z.B. Folie 12-16), aus einer PowerPoint-Datei löschen. Mein Skript: Function DeleteNotNeededSlides { param ( [string]$strFileName, [int]$intNeededSlideFrom, [int]$intNeededSlideTo ) # Create PowerPoint object $comApplication = New-Object -ComObject Powerpoint.Application $comApplication.visible = [Microsoft.Office.Core.MsoTriState]::msoFalse # Open PowerPoint file $objPresentation = $comApplication.Presentations.Open($strFileName) # Delete slides $intSlidesSum = $objPresentation.Slides.Count for($intI = $intSlidesSum; $intI -ge $intSlideTo +1; $intI --) { $objPresentation.Slides.($intI).Delete } # Save and close $objPresentation.Save $objPresentation.Close # Quit PowerPoint object $comApplication.Quit $comApplication = $null } Problem: Das Skript läuft durch, aber die Folien sind noch drin. Ausgabe: OverloadedDefinitions ---------------------------- void Delete () void Delete () ... void Delete () void Save () void Close () void Quit() void _Application.Quit() Hat jemand eine Idee oder eine Lösung damit ich weiter komme!? Danke, Christian
×
×
  • Neu erstellen...