B
Bob Schild
In a VB6 project when I run the following on my active
document I get an error stating "Automation Error The stub
received bad data"
Private Function PassOne() As Boolean
Dim DOC As Word.Document
Dim bolRTN As Boolean
On Error GoTo PassOne_Error
Set DOC = appWord.ActiveDocument
bolRTN = DOC.Content.Find.Execute(findText:="PERSONAL",
ReplaceWith:="TEST", Replace:=wdReplaceAll)
PassOne_Exit:
Exit Function
PassOne_Error:
MsgBox Err.Description
PassOne = False
Resume PassOne_Exit
End Function
document I get an error stating "Automation Error The stub
received bad data"
Private Function PassOne() As Boolean
Dim DOC As Word.Document
Dim bolRTN As Boolean
On Error GoTo PassOne_Error
Set DOC = appWord.ActiveDocument
bolRTN = DOC.Content.Find.Execute(findText:="PERSONAL",
ReplaceWith:="TEST", Replace:=wdReplaceAll)
PassOne_Exit:
Exit Function
PassOne_Error:
MsgBox Err.Description
PassOne = False
Resume PassOne_Exit
End Function