Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim b As Boolean
Dim oSelection As Word.Selection
' Create an instance of Word
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
Set oDoc = oWord.Documents.Open("D:\Temp\X25.DOC")
Set oSelection = oDoc.ActiveWindow.Selection
b = True
With oSelection.Find
.Text = "A"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
While b = True
b = oSelection.Find.Execute
oSelection.MoveRight Unit:=wdCharacter, Count:=1
Wend
Set oSelection = Nothing
oDoc.Close
Set oDoc = Nothing
oWord.Quit
Set oWord = Nothing