All pastes #610433 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-09 13:44 UTC
rendered paste body
    Private Function Find(ByVal strFind As String, ByVal docFind As Word.Document)
        With docFind.Content.Find
            .ClearFormatting()
            .MatchWildcards = True
            .Text = "*"
            .Execute(FindText:="\<\%" & strFind & "%\>*\<%" & strFind & "%\>", Format:=True)
            If .Found Then
                Return ""
            Else
                Return strFind
            End If
        End With
    End Function