Hi,
Thank you for your feedback.
After further investigation, Microsoft PowerPoint can achieve the function of calling the dialog box to add images by inserting Placeholder in Slide Master, as shown in the screenshot below.
You can use the sample code to achieve this feature. The attachment is my result document for your reference. If there is any other issues, just feel free to write back.
- Code: Select all
Presentation ppt = new Presentation();
ppt.SlideSize.Type = SlideSizeType.Screen16x9;
//Get the first master
IMasterSlide masterSlide = ppt.Masters[0];
//Add image selection tool
masterSlide.Layouts[6].InsertPlaceholder(InsertPlaceholderType.Picture, new RectangleF(300, 150, 300, 300));
ISlide side = ppt.Slides[0];
side.Layout = masterSlide.Layouts[6];
ppt.SaveToFile(@"Result.pptx", FileFormat.Pptx2013);
Sincerely,
Amin
E-iceblue support team
Login to view the files attached to this post.