View Full Version : find and replaceall macro for powerpoint

04-16-2007, 07:12 AM
Help me please...

I am trying to program my first ever macro in powerpoint 2003/2007. I don't think what I want to do is complicated and could really do with a finished bit of working code to paste into visual basic. I am a novice and the help pages and many hours of scouring the internet has come to no answer.

I want the macro to find the text "qu1" which is featured 17 times in the presentation and replace it with text entered from a dialogue box. The macro will need to do a bit more than this eventually but I should be able to figure out how to do the rest.

Cheers for any help,


04-26-2007, 07:11 PM
PP's object model doesn't expose it's built-in dialog boxes the way Excel and Word do. The best you can do usually is to use SendKeys to invoke the dialog in the open window. So this might be a more flexible way to do what you want


Sub MyReplace()
Call SendKeys("^h")
End Sub

04-26-2007, 11:28 PM
Cross posted and solved HERE (http://www.ozgrid.com/forum/showthread.php?t=67289).

Thanks for your input Paul.


04-27-2007, 01:44 PM
Does the attached help? Text entered at runtime is stored in a textbox on the slide and a command button then runs a macro to replace qu1 with this text! :)