Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From <a href="http://msdn.microsoft.com/en-us/library/aa300858(VS.71).aspx" rel="nofollow noreferrer">MSDN</a></p> <p>The Find object allows you to search for and replace text in places of the environment that support such operations, such as the Code editor. </p> <p>It is intended primarily for macro recording purposes. The editor's macro recording mechanism uses Find rather than TextSelection.FindPattern so that you can discover the global find functionality, and because it generally is more useful than using the TextSelection Object for such operations as Find-in-files.</p> <p>If the search operation is asynchronous, such as Find All, then the <strong>FindDone</strong> Event occurs when the operation completes.</p> <pre><code>Sub ActionExample() Dim objFind As Find = objTextDoc.DTE.Find ' Set the find options. objFind.Action = vsFindAction.vsFindActionFindAll objFind.Backwards = False objFind.FilesOfType = "*.vb" objFind.FindWhat = "&lt;Variable&gt;" objFind.KeepModifiedDocumentsOpen = False objFind.MatchCase = True objFind.MatchInHiddenText = True objFind.MatchWholeWord = True objFind.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral objFind.ResultsLocation = vsFindResultsLocation.vsFindResultsNone objFind.SearchPath = "c:\&lt;Your&gt;\&lt;Project&gt;\&lt;Path&gt;" objFind.SearchSubfolders = False objFind.Target = vsFindTarget.vsFindTargetCurrentDocument ' Perform the Find operation. objFind.Execute() End Sub &lt;System.ContextStaticAttribute()&gt; _ Public WithEvents FindEvents As EnvDTE.FindEvents Public Sub FindEvents_FindDone(ByVal Result As EnvDTE.vsFindResult, _ ByVal Cancelled As Boolean) _ Handles FindEvents.FindDone Select Case Result case vsFindResultFound 'Found! case else 'Not Found Ens select End Sub </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload