// Hook: AfterPowerPoint // Halt the job if the presentation has fewer than the expected number of // slides. // // Useful for catching template misconfigurations or data-driven decks that // silently produced no slides for a segment. Adjust 'minimumSlides' to your // real expectation. const int minimumSlides = 3; if (Presentation.Slides.Count < minimumSlides) { AddError($"Presentation has only {Presentation.Slides.Count} slide(s); expected at least {minimumSlides}. Check the PowerPoint template and datasource configuration."); } Logger.LogInformation($"Slide count validation passed: {Presentation.Slides.Count} slide(s).");