Also, from this link: (eugenem)
http://www.experts-exchang
procedure wordReplace( range : Range; source : String; target : Variant );
var
vFindText, vReplaceWith, vMatchCase, vMatchWholeWord, vReplace : OleVariant;
begin
if vartype(target) = varNull then target := '';
vFindText := source;
vReplaceWith := target;
vMatchCase := true;
vMatchWholeWord := true;
vReplace := wdReplaceAll;
range.Find.Execute( vFindText, vMatchCase, vMatchWholeWord, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, vReplaceWith, vReplace, EmptyParam, EmptyParam, EmptyParam, EmptyParam );
end;
usage:
d : WordDocument
wordReplace( d.range, 'source', 'target' )
Shane
Main Topics
Browse All Topics





by: shaneholmesPosted on 2004-03-30 at 07:00:48ID: 10713993
Check out this site:
e.co.uk/Au toWord.htm
http://www.djpate.freeserv
There is a tip on how to insert text
Shane