// Hook: AfterPowerPoint // Brand every slide with a consistent footer and visible slide numbers. // // The footer is "" or " - " when the Region // parameter is set. Useful when one template is shared across business units // that maintain their own master variants and may have the footer placeholder // turned off. if (Presentation == null || Presentation.Slides.Count == 0) { AddWarning($"Presentation for '{OutputName}' is empty; nothing to brand."); return; } var hasRegion = Parameters.TryGetValue("Region", out var region) && !string.IsNullOrWhiteSpace(region); var footerText = hasRegion ? $"{JobName} - {region}" : JobName; foreach (var slide in Presentation.Slides) { var hf = slide.HeaderFooterManager; hf.SetFooterVisibility(true); hf.SetFooterText(footerText); hf.SetSlideNumberVisibility(true); } Logger.LogInformation($"Branded {Presentation.Slides.Count} slide(s) with footer '{footerText}'.");