Hi
This has little (none in fact!) error trapping so use on a copy with care
Sub ReplaceText()
Dim strchange As String
Dim strto As String
Dim fromslide As Integer
Dim toslide As Integer
Dim oSld As Slide
Dim oShp As Shape
Dim oTxtRng As TextRange
Dim oTmpRng As TextRange
strchange = InputBox("change")
strto = InputBox("to")
fromslide = InputBox("From slide")
toslide = InputBox("To slide")
For n = fromslide To toslide
Set oSld = Application.ActivePresentation.Slides(n)
For Each oShp In oSld.Shapes
Set oTxtRng = oShp.TextFrame.TextRange
Set oTmpRng = oTxtRng.Replace(FindWhat:=strchange, _
Replacewhat:=strto, WholeWords:=True)
Do While Not oTmpRng Is Nothing
Set oTxtRng = oTxtRng.Characters(oTmpRng.start + oTmpRng.Length, _
oTxtRng.Length)
Set oTmpRng = oTxtRng.Replace(FindWhat:=strchange, _
Replacewhat:=strto, WholeWords:=True)
Loop
Next oShp
Next n
End Sub
--
-----------------------------------------
Did that help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
Nicholsa said:
Thanks Echo. I was talking about Find and Replace. But my VBA isn't at that
level. Anyone else have thoughts? Has anyone seen VBA that can do this?
Thanks,
Nick
Echo S said:
Are you talking about Replace Fonts? Or Find and Replace?
I guess it doesn't matter -- either way, it runs on all slides in the deck.
You might be able to use some custom code to do this on selected slides
only, though. How's your VBA?
--
Echo [MS PPT MVP]
http://www.echosvoice.com
Fixing PowerPoint Annoyances
http://www.oreilly.com/catalog/powerpointannoy/
PPTLive! Sept 17-20, 2006
http://www.pptlive.com
Nicholsa said:
I know I can use standard "replace" until I've made the necessary changes
in
all of the slides in a deck.
I know I can copy and paste the slides I want to change into a new
document
and run replace all, or save the document with only those slides and run
replace all.
But is there a way to select some slides within a larger deck and run
"Replace All" on those slides only?