find-replace in word from vb.net ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This does work with Word 2000, 2002, 2003 but not with Word 97, any idea

Public Function testMYWord(
Dim wApp As New Word.Applicatio
Dim objWord As Word.DocumentClas

objWord
wApp.Documents.Open("c:\MyDocuments\Ontvangstmelding.doc"
wApp.ActiveDocument.Content.Find.Execute("customername", False
False, False, True, False, False, False, True ,"REPLACED", True
wApp.Visible = Tru
End Functio
 
It's been a long time since I had anything to do with Word 97, but the
way I'd tackle this problem is to record a find macro in Word 97 and
examine the syntax. There may be slightly different arguments or
syntax between the versions. Also, read at the error message for
clues.

--Mary
 
Back
Top