.Find.Execute method
Brought to you by:
xtmouse
How can I realize this?
Set myRange = ActiveDocument.Content
myRange.Find.Execute FindText:="hi",
ReplaceWith:="hello", _
Replace:=wdReplaceAll
'------- try in FreeBasic ---------
dhCreateObject("Word.Application", NULL, @wdApp)
dhGetValue("%o", @wdDoc, wdApp, ".ActiveDocument")
dhGetValue("%o", @wdRange, wdDoc, ".Content")
dhCallMethod( wdRange,".Find.Execute (FindText=%s,
ReplaceWith=%s, Replace=%d)","p","zzzzz",2)
--Error---------
Function: CallMethod
Error in: InvokeArray
Error: Type mismatch: 'Execute'.Argument index:0
WBR, Ahdrew