|
Programmer's Reference >
WordApplication API >
SearchMatch > Replace
Replace Method
Signature:
public void Replace ( String replaceWith
)
Description:
Replaces this match with the specified string.
Parameters:
|
replaceWith |
The replacement string. |
Example:
[csharp]
WordApplication app = new WordAppliation();
Document doc = app.Open(@"C:\somedoc.doc");
IEnumerator searcherator = doc.Search("crimson");
while (searcherator.MoveNext())
{
SearchMatch match = (SearchMatch)searcherator.Current;
match.Replace("red");
}

Copyright 2007 © SoftArtisans, Inc. All Rights Reserved.
|