• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Searching for Text within a file

fsbgav

Junior Member
Hi

This is my first visit to this forum so excuse me if this is posted in the wrong place.

Here's my conundrum...

I have a large number of files that I use regularly to copy and paste sections from when creating official letters. I would find the text I needed by using the 'search for text within a file' ability within the search facility in Windows Explorer.

Recently my company switched to Windows Virtual Desktop for all users. In doing so they have disabled the 'search for text within a file' ability within the search facility in Windows.

I asked if this could be enabled, and met with a resounding 'No'.

The cmd window function is also disabled so I cannot run grep.

I have tried to install other file search applications but only administrators can install applications.

Does anyone know any other method how I can search for text within files (either locally or on a network drive), that doesn't need any of the above. I have tried Google but have had no luck.

Cheers

fsbgav
 
Use a word macro. Here is a sample below of a bulk search and replace, you could just have it stop when it finds the text. Close the doc if it does not:

Sub FindReplaceAllDocsInFolder( )
Dim i As Integer
Dim doc As Document
Dim rng As Range

With Application.FileSearch
.NewSearch
.LookIn = "B:\Attachments\"
.SearchSubFolders = False
.FileType = msoFileTypeWordDocuments
If Not .Execute( ) = 0 Then
For i = 1 To .FoundFiles.Count
Set doc = Documents.Open(.FoundFiles(i))
Set rng = doc.Range
With rng.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "Andy"
.Replacement.Text = "Matt"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With

doc.Save
doc.Close

Set rng = Nothing
Set doc = Nothing
Next i
Else
MsgBox "No files matched " & .FileName
End If
End With
End Sub
 
id suggest moving to something like OneNote for this, i know that doesnt resolve your search issue right away, but it would work pretty well for what you are doing. each "document" gets copied into a page in one note, which is excellent at searching everything in a notebook. then copy and paste from there.

also:
http://docfetcher.sourceforge.net/en/download.html

have not used it or tried it. people at work love AgentRansack and this is an alternative. you can get the portable edition and just unzip it to your documents folder

3rd option: work slow and when you boss complains gut IT in the firing line. im an IT guy and i like to solve user problems, which may or may not be hard in a larger environment...but sometimes IT needs a kick in the pants too.
 
Get your stupid admins to install something like AgentRansack or its big brother, File Locator Pro.
 
Thanks for all the suggestions...will give them a go.

I work for the government so giving the admins a hard time only pisses them off as their bound by stipulations from higher up.
 
Last edited:
I work for the government

Should of mentioned this earlier, I really doubt that the Admins will change their mind on installing anything. They are probably bound by (more than likely stupid) Federal regulations.

I second the OneNote suggestion, though to me it sounds like custom templates would also do the job.
 
Back
Top