TextRange.Find Method
Finds the specified text in a text range, and returns a TextRange object that represents the first text range where the text is found. Returns a null reference (Nothing in Visual Basic) if no match is found.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function Find ( _
FindWhat As String, _
After As Integer, _
MatchCase As MsoTriState, _
WholeWords As MsoTriState _
) As TextRange
'Usage
Dim instance As TextRange
Dim FindWhat As String
Dim After As Integer
Dim MatchCase As MsoTriState
Dim WholeWords As MsoTriState
Dim returnValue As TextRange
returnValue = instance.Find(FindWhat, _
After, MatchCase, WholeWords)
TextRange Find(
string FindWhat,
int After,
MsoTriState MatchCase,
MsoTriState WholeWords
)
Parameters
- FindWhat
Type: System.String
The text to search for.
- After
Type: System.Int32
The position of the character (in the specified text range) after which you want to search for the next occurrence of FindWhat. For example, if you want to search from the fifth character of the text range, specify 4 for After. If this argument is omitted, the first character of the text range is used as the starting point for the search.
- MatchCase
Type: Microsoft.Office.Core.MsoTriState
msoTrue for the search to distinguish between uppercase and lowercase characters.
- WholeWords
Type: Microsoft.Office.Core.MsoTriState
msoTrue for the search to find only whole words and not parts of larger words as well.
Return Value
Type: Microsoft.Office.Interop.PowerPoint.TextRange