Hi Balu,
Presentation presentation = new Presentation(“D:\handout_header_footer.pptx”);
IMasterHandoutSlide masterHandoutSlide = presentation.MasterHandoutSlideManager.MasterHandoutSlide;
if (masterHandoutSlide != null)
updateHeaderFooterText(masterHandoutSlide);
IMasterNotesSlide masterNotesSlide = presentation.MasterNotesSlideManager.MasterNotesSlide;
if (null != masterNotesSlide)
updateHeaderFooterText(masterNotesSlide);
foreach(ISlide slide in presentation.Slides)
{
INotesSlide notesSlide = slide.NotesSlideManager.NotesSlide;
if (null != notesSlide)
updateHeaderFooterText(notesSlide);
}
presentation.Save(“D:\handout_test_Java.pptx”, SaveFormat.Pptx);
<o:p> </o:p>
public void updateHeaderFooterText(IBaseSlide master)<o:p></o:p>
{
foreach (IShape shape in master.Shapes)
{
if (shape.Placeholder != null)
{
if (shape.Placeholder.Type == PlaceholderType.Header)
((IAutoShape)shape).TextFrame.Text = “HI there new header”;
if (shape.Placeholder.Type == PlaceholderType.Footer)
((IAutoShape)shape).TextFrame.Text = “HI there new footer”;
}
}
}