N
nntp
I have some code that I am trying to do a search and replace on a Rich Text
file.
Dim WordDoc As Object
Set WordDoc = CreateObject("Word.Application")
WordDoc.Documents.Open ("test.rtf")
WordDoc.Application.Visible = True
With WordDoc.Selection.Find
.Text = "AAA"
.Replacement.Text = "BBB"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
WordDoc.Selection.Find.Execute Replace:=wdReplaceAll
MSWord opens and highlights the first instance of the the search but doesn't
replace.
I am using Access 2000 and MSWord 2000.
Any help would be appreciated.
file.
Dim WordDoc As Object
Set WordDoc = CreateObject("Word.Application")
WordDoc.Documents.Open ("test.rtf")
WordDoc.Application.Visible = True
With WordDoc.Selection.Find
.Text = "AAA"
.Replacement.Text = "BBB"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
WordDoc.Selection.Find.Execute Replace:=wdReplaceAll
MSWord opens and highlights the first instance of the the search but doesn't
replace.
I am using Access 2000 and MSWord 2000.
Any help would be appreciated.