P
papou
Hi all
WIN2K Pro
Word 2k SR1
I am encountering an error on the code below (it is executed via a VBScript)
This particular line below raises the error "Number of arguments or Property
...." (sorry cannot be sure about the english equivalent - my version is
french)
objword.Selection.Find.Execute Replace=2
I have tried Replace:=2, Replace 2, and so on, but to no avail.
Can someone please help since I cannot figure what is wrong?
TIA
Cordially
Pascal
'***** DEBUT CODE *****
Dim objword, docword
set objword = CreateObject("Word.Application")
objword.visible=true
set docword = objword.Documents.Open("C:\Documents And Settings\PARO\Mes
Documents\Test\test.doc")
With objword.Selection.Find
.Text = "Mes documents\"
.Replacement.Text = "Mes Documents\Test\"
.Forward = True
.Wrap = 1
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
objword.Selection.Find.Execute Replace=2
set objword = Nothing
WIN2K Pro
Word 2k SR1
I am encountering an error on the code below (it is executed via a VBScript)
This particular line below raises the error "Number of arguments or Property
...." (sorry cannot be sure about the english equivalent - my version is
french)
objword.Selection.Find.Execute Replace=2
I have tried Replace:=2, Replace 2, and so on, but to no avail.
Can someone please help since I cannot figure what is wrong?
TIA
Cordially
Pascal
'***** DEBUT CODE *****
Dim objword, docword
set objword = CreateObject("Word.Application")
objword.visible=true
set docword = objword.Documents.Open("C:\Documents And Settings\PARO\Mes
Documents\Test\test.doc")
With objword.Selection.Find
.Text = "Mes documents\"
.Replacement.Text = "Mes Documents\Test\"
.Forward = True
.Wrap = 1
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
objword.Selection.Find.Execute Replace=2
set objword = Nothing