//ExStart:UpdateHeaderFooterText
 // Method to set Header/Footer Text
 public static void UpdateHeaderFooterText(IBaseSlide master)
 {
     foreach (IShape shape in master.Shapes)
     {
         if (shape.Placeholder != null)
         {
             if (shape.Placeholder.Type == PlaceholderType.Header)
             {
                 ((IAutoShape)shape).TextFrame.Text = "HI there new header";
             }
         }
     }
 }
        public static void Run()
        {
            //ExStart:AccessSlidebyID
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Slides_Presentations_CRUD();

            // Create an instance of Presentation class
            Presentation presentation = new Presentation(dataDir + "AccessSlides.pptx");

            // Getting Slide ID
            uint id = presentation.Slides[0].SlideId;

            // Accessing Slide by ID
            IBaseSlide slide = presentation.GetSlideById(id);
            //ExEnd:AccessSlidebyID
        }