Welcome to OpenXML Developer Sign in | Join | Help

Change slides by slide number

Last post 08-22-2008, 2:19 PM by jasonp. 1 replies.
Sort Posts: Previous Next
  •  08-18-2008, 4:20 PM 3573

    Change slides by slide number

    Hello,

    I have a requirement to change the content of slides based on certain criteria.   For example, I would need to replace an image on slide 2, 5, and 7.   How would I go about doing this?   I imagine I would have to get the SlidePart of the 3 slides in order to replace the placeholder image already on the slide but not sure how to go about it.  

    Thanks

  •  08-22-2008, 2:19 PM 3599 in reply to 3573

    Re: Change slides by slide number

    I figured I would reply to my post with the answer since I discovered how to do this.   I basically grabbed the Slide Part Uri which had the path to the slide.   Once I had the Uri I could loop through the SlidePart list to find the slide I needed to access.

    slideUri = slidePart.Uri.ToString();

    // Get Image parts for slidePart
    // Switch images and save

View as RSS news feed in XML