Hello,
I cannot change the footer test in a Notes slide when using the HeaderFooterManager on the Presentation object (via the SetAllFootersText() method). The SetAllHeadersText and method does change the header in the Notes object and SetAllDateTimesText will change the date on both the slide and on the notes slide.
I am using Slides .Net 18.4.
This is the code I am using:
if (UseMainHeaderManager&& presentation.HeaderFooterManager != null)
{
presentation.HeaderFooterManager.SetAllDateTimesVisibility(true);
presentation.HeaderFooterManager.SetAllDateTimesText("NUnitDate");
presentation.HeaderFooterManager.SetAllFootersVisibility(true);
presentation.HeaderFooterManager.SetAllFootersText("NUnitFooter");
presentation.HeaderFooterManager.SetAllHeadersVisibility(true);
presentation.HeaderFooterManager.SetAllHeadersText("NUnitHeader");
}
else
{
foreach (Aspose.Slides.Slide slideItem in presentation.Slides)
{
if (slideItem.HeaderFooterManager != null)
{
slideItem.HeaderFooterManager.SetDateTimeVisibility(true);
slideItem.HeaderFooterManager.SetDateTimeText("NUnitDate");
slideItem.HeaderFooterManager.SetFooterVisibility(true);
slideItem.HeaderFooterManager.SetFooterText("NUnitFooter");
if (slideItem.NotesSlideManager != null &&
slideItem.NotesSlideManager.NotesSlide != null &&
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager != null)
{
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager.SetDateTimeVisibility(true);
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager.SetDateTimeText("NUnit Notes Date");
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager.SetHeaderVisibility(true);
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager.SetHeaderText("NUNit Notes Header");
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager.SetFooterVisibility(true);
slideItem.NotesSlideManager.NotesSlide.HeaderFooterManager.SetFooterText("NUnit Notes Footer");
}
}
}
}
Here is a sample file, and my PPTX created output:
Powerpoint-HeaderFooterFields.zip (164.9 KB)
Thanks,
Sheri