Vba PowerPoint Shapes

Premanshu

Board Regular
Joined
Oct 2, 2007
Messages
91
Hi,

first of all I am sorry i am posting a PowerPoint related question here, please guide me to the right place if you know of one.

I am trying to prepare a power point macro which when triggered will first read all the shapes that are currently present in the ppt file and then will sear for specific texts in each of them, if found it would highlight the text using a new shape in the baground. Once it has looped through all the shapes it will start again from the first shape and would search for another text (but the catch here is it should not loop through the shapes which it created while highlighting texts that were found while it was running the first time).

To do this i crated a vriable as "Dim MyShps as Shapes" but know i am not sure how do i set the MyShps variable to read the shapes that were present in the file at the very begining. I tried building below code:-


Code:
Sub Trial1()

Dim MyShps as Shapes
Set MyShps = array(ActivePresentation.Slides(1).Shapes(1), _
ActivePresentation.Slides(1).Shapes(2),ActivePresentation.Slides(1).Shapes(3))

End Sub

Also please let me know if in the macro while it is in middle if i want to add a few more shapes to the MyShps variable without removing previously defined shapes how can i do that.

Any help on this will be highly appreciable... please help
Thanks in Advance.

Regards,
Premanshu
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top