OK, so you have a badly-formatted document, with paragraph breaks instead of line breaks between consecutive lines, and yet more paragraph breaks for inter-paragraph spacing, along with pointless tabs!
Given that scenario, you could use something like:
Code:
Sub PolicyDocs()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, StrName As String, wdDoc As Document
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.doc", vbNormal)
While strFile <> ""
If Not strFile Like "Policy[*].doc" Then
StrName = ""
Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
With wdDoc
With .Range
With .Find
.ClearFormatting
.Text = "Policy[!^13]{1,}"
.MatchWildcards = True
.Forward = True
.Wrap = wdFindStop
.Execute
End With
If .Find.Found Then StrName = .Text
End With
If StrName <> "" Then .SaveAs FileName:=.Path & "\" & StrName & ".doc"
.Close
End With
End If
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