Hello
I am a bit of a VBA begginer, and a complete powerpoint VBA novice.
I am trying to write my first powerpoint macro and need a bit of assistance getting started.
Can anyone tell me how i check if there is a shape at a certain location on a slide, and if there is, then do something (send slide to back) as well as get text in the shape
A mroe full explanation is below. Thanks so much for any guidance.
Fishj
the situation: i would like to sort slides based on whether they have a certain shape at a certain position, and also based on matching the text in the shape to something. I will try and explain:
1. if slide has a shape (will refer to this as BOXA) at left 156, top 516.75 then send slide to back of presentation. Loop through all slides so we end up with all slides with BOXA on them at the back of the presentation
2. For each slide
a. if there is a BOX A (ie at 156,516.75) then get the text in BOX A (this will be a section number - ie 2.1 or 2.5)
b. loop through all slides and compare to the first characters (this is a section number - ie 2.1 or 2.5) of the box in position 156,78 (lets call this BoxB) (I am thinking you have to select text in BoxB, do a left function of amount of characters before the first space, and match on that)
i. if it¡¯s the same, then take the slide number of the matched slide and put that slide number in BOX A (as text)
3. We will therefore end up with all the BOX A slides at the back, and in each BOXA will be the text of the page number which corresponds to the matched slide at the front end of the document
4. Finally sort all the Box A slides to make sure they are in correct order (numbers ascending) at the back of the document
for context, i am trying to get appendix type of slides to match to the slide number in the main part of a presentation. (ie only appendix slides have Box A on them). When writing a presentation we start off having these appendix slides in the main document, but then want to put them to the back and make sure they reference the correct number
I would appreciate any thoughts on this or any pointers on how to get started. I very much appreciate any assistance - if this works it will automate something that i spend an inordinate and frustrating amount of time doing!