Created
April 5, 2024 07:52
-
-
Save fileformat-slides-gists/35457af944ddde5068b8161c415d914d to your computer and use it in GitHub Desktop.
How to Add Pictures to PowerPoint PPT PPTX Slides | FileFormat.Slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}"); | |
// Get Slides | |
var slides = presentation.GetSlides(); | |
var slide = slides[1]; | |
// Get Images from slide | |
List<Image> images = slide.Images; | |
// Choose desired image | |
var image = slide.Images[0]; | |
// Set xAxis | |
image.X = xAxis; | |
// Set yAxis | |
image.Y = yAxis; | |
// Update image | |
image.Update(); | |
// Save presentation | |
presentation.Save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment