![]() ![]() I checked (at least in my case) that when I create a slide and apply a layout that has named placeholders (image1, text1.), the placeholders revert their names to generic names such as 'Text Placeholder 1' or 'Picture Placeholder 1' in the instantiated slide. Now, what I actually wanted was to be able to use named placeholders to set data for each item in each slide. 'Use With keyword to access the current object and then use Shapes.AddPicture / Text method.Ĭall (image_path. The solution is to simply use the AddPicture and Text methods by iterating over all the shapes: 'Iterate over all shapes of a slide oSlide and get an individual shape oShp object. So any help is much appreciated.Īfter some further investigation, I found one solution and also an issue I was not aware of. Can someone point me to the correct syntax for the above problem? I am using office 2019 and I am new to using vb scripting for powerpoint. However, I am not able to make it work in any way so far. What I typically find online is something like this (or variations): ("name_of_placeholder").Select msoTrueĬall ("image_path", msoTrue, msoTrue, left, top) The kind of solution I am looking for looks like this since it gives me the opportunity to use the placeholder by name (not necessarily a one liner): ("name_of_placeholder").AddPicture() I found the AddPicture and Placeholder methods from documentation and various posts but I am not able to successfully add an image or text. I would like to add image/text to these placeholders using their name. For example, I have 5 placeholders in my layout, namely, title, image1, image2, text1, text2. I would like to ideally use the name of the placeholder for each slide as set in the template powerpoint to add data. Now, I want to add text/image to specific placeholders that I have created in the layout. I am able to generate empty slides with the custom layout applied correctly. ![]() ![]() I am trying to find a way to add images to existing placeholders in a slide with a custom layout using a standalone. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |