|
-
Apr 2nd, 2006, 04:42 AM
#1
Thread Starter
New Member
How to find a particular text in powerpoint
Hi,
Is there any possibility of finding a particular text in a powerpoint presentation file and it should return me in which slide the finding text is present.
Thankz,
Raj
-
Apr 2nd, 2006, 08:51 AM
#2
Re: How to find a particular text in powerpoint
Hi,
This post is related to MS Power Point (Office Development, aka VBA). So you need to post it in Office Development Forum. So that you will get quick responses. Anyway here is the solution for your question:
VB Code:
'This example finds every occurrence of "Friend" in the active presentation and
'returns the slide number.
Dim sld As Slide
Dim shp As Shape
Dim txtRng As TextRange
Dim foundText As TextRange
For Each sld In Application.ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
Set txtRng = shp.TextFrame.TextRange
Set foundText = txtRng.Find(FindWhat:="Friend")
Do While Not (foundText Is Nothing)
With foundText
'Debug.Print sld.Name
Debug.Print sld.SlideIndex
Exit For
End With
Loop
End If
Next
Next
-
Apr 3rd, 2006, 06:52 AM
#3
Re: How to find a particular text in powerpoint
Moved to Office Development
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|