Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    Orlando, Florida
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Search & Replace Multiple Docs

    Using MS Word 2010. Win 8.1

    So, I have some sensitive information in multiple (many, many) documents (primary word docs), various word versions.
    Multiple folders but all in the documents library.

    Trying to perform a search of all of the documents and then ultimately perform a find an replace of the desired information.
    I have only been partially successful. I have performed a search on the documents library and think I have identified all of the individual word documents with the sensitive information. Then I attempted to open many of the documents and do an individual find and replace in each individual document. This takes quite a bit of time but I know of no other way to accomplish my task. I will continue to do this unless someone can tell me a better or more efficient method. I must alter this sensitive information.
    The main problem I have encountered is that Word continues to identify the documents I have already performed the find and replace function. What I did: Found the sensitive document, opened it, performed a find and replace, saved and closed the document. Performed another search of all the library documents and the previously edited documents - with the information removed - is again identified in my list. I have checked the same document multiple times and am pretty sure the desired data has been purged. So, any thoughts? I suspect that there is a way to force some sort of re-indexing (or some such thing) of my documents but I can not find out if there is such a thing or how to do it if there is such a thing. Any thoughts or suggestions are appreciated.

    Thank you.
    Randall

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Madison, Wisconsin, Wisconsin, USA
    Posts
    1,649
    Thanks
    47
    Thanked 54 Times in 52 Posts
    It depends on where the information is stored. If any of the documents have track changes turned on (but not necessarily displayed) the old information is still there. It might also be in document properties which are not displayed.

    Finally, Windows can take some time to refresh its search indices. That may be what you are running into.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #3
    New Lounger
    Join Date
    Dec 2009
    Location
    Orlando, Florida
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks for the information. I have never knowingly used the track changes feature you mention. I shall look at a few of my documents and see if my sensitive data is stored there. And, from your response, it appears that it is Windows that does the indexing and not Word as I was thinking. Thanks.

  5. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Madison, Wisconsin, Wisconsin, USA
    Posts
    1,649
    Thanks
    47
    Thanked 54 Times in 52 Posts
    Leaving your computer running overnight can help, as can restarting it to flush the RAM.
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #5
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Madison, Wisconsin, Wisconsin, USA
    Posts
    1,649
    Thanks
    47
    Thanked 54 Times in 52 Posts
    You would want to have the Track Changes status button active on your Word window's status bar. Right-click in the Status bar (bottom of window with page number) and check it. When you open a document it will tell you if track changes is turned on (although not whether it was turned on at some time in the past).

    I always leave this displayed in Word. Anyone dealing with sensitive data should.

    On the Review tab you can change the option from "Final" to "Final Show Markup."
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,769
    Thanks
    0
    Thanked 162 Times in 150 Posts
    Doing a Find/Replace on a document that either now has or has had Track Changes 'on' can result in found data not being deleted or previously-deleted data not being not being updated.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #7
    New Lounger
    Join Date
    Dec 2009
    Location
    Orlando, Florida
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts
    After I run a search on my word documents and the screen comes up showing all the desired individual files.....
    any idea how many files I can (safely) open at the same time?

    Thanks

  9. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,769
    Thanks
    0
    Thanked 162 Times in 150 Posts
    AFAIK there is no 'design' limit. However, the practical limit will be determined by numerous factors, including CPU processing power, RAM and document size/complexity.

    Far better, IMHO, to let Word process the documents sequentially. The following macro allows you to browse to a folder containing the documents you want to process, then process all documents in that folder automatically. Simply add your Find/Replace code where indicated.
    Code:
    Sub ProcessDocuments()
    Application.ScreenUpdating = False
    Dim strFolder As String, strFile As String, wdDoc as Document
    strFolder = GetFolder
    If strFolder = "" Then Exit Sub
    strFile = Dir(strFolder & "\*.doc", vbNormal)
    While strFile <> ""
      Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
      With wdDoc
        With .Content.Find
        'Add your Find/Replace code here
        End with
        .Close SaveChanges:=True
      End With
      strFile = Dir()
    Wend
    Set wdDoc = Nothing
    Application.ScreenUpdating = True
    End Sub
    
    Function GetFolder() As String
    Dim oFolder As Object
    GetFolder = ""
    Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
    If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
    Set oFolder = Nothing
    End Function
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •