find-replace does not work from vb.net ? (office 97)

  • 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
 
Dear Acidburn,

There are sure some difference between word 2000, 2002, 2003 and word 97,
And some coding may not work fine in the earlier version. You may go to the
following link to get the more detail about Find.execute in word97.
http://msdn.microsoft.com/library/d...y/en-us/office97/html/output/F1/D4/S5AA55.asp


--
--------Hope this may help you--------
Regards,
Microsoft MVP(.NET in 2003), Microsoft(Taiwan & Hong Kong) Community Star
Ken Lin(HK)
Vice President of Hong Kong .NET User Group(www.hknetug.com)
MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & Win2K), MCSE+I,
MCDBA(SQL7 & SQL2K), MCSD(VB6, VB.NET), MCAD(VB.NET)
MCT2004
 
Hi,

Which line return the error?
What is the exact error message?
Since the word application is back-compatible, if you wants to an
automation application to work with all the version of office product, you
need to compile with the earliest version. That is to say you may need to
compile with word 97 in this senario, or you can use use latebinding.

For detailed information, you may take a look at the KB below.
INFO: Writing Automation Clients for Multiple Office Versions (244167)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;244167

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top