Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: WORD Find and replace
For reference, see the list of OLE constants in the DB.
Option Explicit Sub ExecuteReplace() ' This procedure demonstrates using the Execute ' method to replace text. ' Open the file. Documents.Open FileName:="c:\odept1dc.doc" Documents("odept1dc.doc").Activate ' Loop until no more items are found. Do Selection.Find.ClearFormatting With Selection.Find .Text = "display" .Execute ReplaceWith:="show", _ Replace:=wdReplaceAll, Forward:=True End With ' Exit the loop when the search is unsuccessful. If Selection.Find.Execute = False Then Exit Do Loop End Sub
Article ID: W15665
File Created: 2003:05:13:11:29:24
Last Updated: 2003:05:13:11:29:24